StoneHeart
StoneHeart

Reputation: 16610

How to find out light, medium and dark color?

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

Answers (1)

Ocaso Protal
Ocaso Protal

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

Related Questions