mirror of
https://github.com/KevinMidboe/zoff.git
synced 2025-10-29 18:00:23 +00:00
Added colors in chrome android
This commit is contained in:
@@ -157,6 +157,15 @@ var Helper = {
|
||||
if(l>0.5)l=0.5; //make sure it isnt too light
|
||||
|
||||
return "hsl("+Math.floor(h*360)+", "+Math.floor(s*100)+"%, "+Math.floor(l*100)+"%)";
|
||||
},
|
||||
|
||||
componentToHex: function(c) {
|
||||
var hex = c.toString(16);
|
||||
return hex.length == 1 ? "0" + hex : hex;
|
||||
},
|
||||
|
||||
rgbToHex: function(r, g, b) {
|
||||
return "#" + Helper.componentToHex(r) + Helper.componentToHex(g) + Helper.componentToHex(b);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user