Today I Learned - Rocky Kev

TIL Why gray is darker than darkgray

POSTED ON:

TAGS:

Lighter Gray:
color: darkgray;

Darker Gray:
color: gray

!(grays)[2020-07-15-gray.png]

Gray '#808080' (128,128,128)
DarkGray '#A9A9A9' (169,169,169) //equal to X11 DarkGray
Silver '#C0C0C0' (192,192,192) //close to X11 Gray (190,190,190)
LightGray '#D3D3D3' (211,211,211) //equal to X11 LightGray

Why?

These colours don't actually originate in HTML` - they date still further back than that to the X Window System that originated on UNIX systems. The HTML specification defines sixteen named colours that map onto the basic sixteen colours present in the EGA palette, but the earliest browsers such as Mosaic also supported any of the other X11 named colours, based on their colour representation as defined on X. Unfortunately, some of the original sixteen named colours have different representations to the X11 equivalents, for example Green is represented in X11 in this colour, whereas in HTML it's represented in this colour. The unfortunate result is that Gray is defined as #808080 in HTML, but DarkGray is represented as #A9A9A9, meaning that they're the wrong way around. Since WPF allows the same named colours as HTML for compatibility, the result is that the same idiosyncrasies carry forward. (You can find more information on the full set of X11 colour names and their representations in Wikipedia).

(reference)[https://stackoverflow.com/questions/3811973/why-is-darkgray-lighter-than-gray]


Related TILs

Tagged:

TIL Content sectioning

Content sectioning or landmarks, like sidebar, content, footer. You know, like better names.

TIL php-fpm

PHP runs as a separated service when using PHP-FPM. By using this PHP version as language interpreter, requests are processed through a TCP/IP socket; so that the Nginx web server only handles the HTTP requests and PHP-FPM interprets the PHP code. The fact of having two separate services is key for increasing efficiency.

TIL Considering Device Obsolescence with web development

I'm incredibly guilty of pushing to build for the latest tech. For good reason too - you can write less code, use more native functions, and things are just more likely to work.