Why is in WPF the color "Gray" darker then the color "DarkGray". My logic says that "DarkGray" shoud be darker.
Should it not be LightGray, Gray, Darkgray?
These color names actually come from the CSS Color Module Level 3 W3C Recommendation and the strange definition of Gray and Dark gray actually comes from merging the X11 and web standards. To quote wikipedia:
Perhaps most unusual of the color clashes between X11 and W3C is the case of Gray. In HTML, Gray is specifically reserved for the 128 triplet, i.e. 50% gray. However, in X11, ‘gray’ was assigned to the 190 triplet, i.e. 75%, which is close to W3C ‘Silver’, and had ‘Light Gray’ at 211 and ‘Dark Gray’ at 169 counterparts. This resulted in W3C’s ‘Gray’, at 50%, actually being significantly darker than ‘Dark Gray’, at 66%.
While I agree that the naming suggests that Colors.DarkGray
would be darker than Colors.Gray
, DarkGray is defined and documented to be #FFA9A9A9
, and Gray is defined to be #FF808080
(which is darker).
That being said, you can define any color you wish, and not use the predefined system colors.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With