Open macik opened 11 years ago
Yeah I agree. Someone would have to test to find out what the threshold for a "dark" colour is, then we could just invert the color in the css if its below that.
The basic formula to calculate brightness from RGB is:
Y(brightness) = 0.299 * R + 0.587 * G + 0.114 * B;
So you get 0-255 range of color brightness. Then just select any threshold (for example 64 or less).
Oh cool, I didn't know that. I'll implement this in the coming days, thanks.
Text color of codes for dark colors should be inverted or highlighted to be normally viewed. (Now it's very dark and not readable.)