+ 1
Why numbers????
will i am wondering why we use numbers to choose colors while we can use their names????
4 Answers
+ 2
becayse colors are represented by hexadecimal values that a computer can interpret. computers cannot understand English directly and at some level human readable code is broken down into machine code, that the processor and gpu can process as instructions.
+ 1
With 32bit exist 2^32 possible colors... You can give a name to all they? đ
+ 1
I was wondering if performance could be related*
Here's a performance test comparing color names against hex, rgb*() and hsl*() coding:
https://jsperf.com/css-color-names-vs-hex-codes/25
"Long hex codes" won the first time I ran it, but every subsequent run "color names" has finished first.
* The differences don't seem to be that great between hex and names, but those function-like constructs look like they matter.
+ 1
In addition to KrOW's comment about not having names for all possible color values...
We use numbers for consistency in expected output. Historically, the list of standardized color names changed (and very likely could change again in the future).
https://css-tricks.com/nerds-guide-color-web/
https://en.wikipedia.org/wiki/Web_colors
https://css-tricks.com/snippets/css/named-colors-and-hex-equivalents/
One more for luck:
https://caniuse.com/#search=rebeccapurple