Added color picker.

This commit is contained in:
Devine Lu Linvega
2016-12-22 08:04:56 -07:00
parent c6b6d6a080
commit d28fcb7a60
6 changed files with 56 additions and 16 deletions

View File

@@ -24,4 +24,9 @@ function Color(hex = '#000000')
{
return this.hex;
}
this.rgb_to_hex = function(rgb)
{
return "#"+("0" + parseInt(rgb[0],10).toString(16)).slice(-2)+("0" + parseInt(rgb[1],10).toString(16)).slice(-2)+("0" + parseInt(rgb[2],10).toString(16)).slice(-2);
}
}