I am trying to make a function in java script that get a hex color code and return true if the color is more deep (close to black color), or false if the color is more bright (close to the white color).
Any ideas?
I am trying to make a function in java script that get a hex color code and return true if the color is more deep (close to black color), or false if the color is more bright (close to the white color).
Any ideas?
Regarding the parsing part take a look at this answer, then you'll have RGB if they're close to 0 the color is dark and if they're close to 255 the color is bright.