Reputation: 16610
I have a color in hex format ex (c3d8f7 (light blue), 303f5a (dark blue)). How to find out if that color is light or dark?
Upvotes: 2
Views: 1358
Reputation: 20255
Very rough algorithm: Convert the color to HSV and check e.g. if V
is above (light) 75% or below (dark) 25%.
Upvotes: 3