DEV Community

loading...

TIL: In CSS, DarkGray is lighter than Gray

mr_eis profile image Marius Eisenbraun ・1 min read

When building prototypes or examples, I often use named CSS colors.

After playing around and working with CSS for some years, today I learnt:

DarkGray is lighter than Gray 🤔

It got me so confused, I had to check it three times.

The easy solution:
If you want a "dark gray", choose DimGray.☝️

Discussion (4)

pic
Editor guide
Collapse
patarapolw profile image
Collapse
gillmangareth profile image
Gareth Gillman

codepen.io/garethTF/pen/gObeVYY

Seems wierd but it's true... CSS is confusing at times.

Collapse
mr_eis profile image
Marius Eisenbraun Author

Oh someone was faster than me :D

Thanks, for the CodePen!

Collapse
johnnykoo84 profile image
Johnny Koo

never knew about it until I see this post Thanks