CSS colors - Code in hexadecimal, rgb and rgba
Color indications can also be defined in different ways. The most used is the hexadecimal notation of pairs of values (# ff9933).
The hexadecimal notation is the most common way to declare colors in CSS, we do not see any important reason to move away from this syntax, even when there are other possibilities, to define RGB values, for example rgb (75.5%, 32.75%, 24.25%) or rgb (0.255.0)
On the other hand, there are 17 keywords to indicate the color, based on the VGA colors originally from Windows:
Aqua, black, blue, fuchsia, gray, green, lime, maroon, navy, olive, orange, purple, red, silver, teal, white, yellow.
There are browsers with keywords for the color other than these, but since they were never part of the CSS specification, there is no guarantee that they will be interpreted correctly.
Even those who are forced to work with a limited color palette (or the so-called web-safe) have many possibilities to use much more beautiful values and color gradations.
There is also a list of keywords of system colors, that is, colors that are defined by the operating system. They have good browser support, although it is not perfect. And they do not have much future, since CSS already has 3 modules of color to paint. In them a new property appears (appearance) that allows to control not only the individual colors but the whole image as a whole, including, with all security, buttons, menus, toolbars, dialog boxes, and even the window frames.
ChatGPT Free
Ask questions on any topic
CITE ARTICLE
For homework, research, thesis, books, magazines, blogs or academic articles
APA Format Reference:
Delgado, Hugo. (2019).
CSS colors - Code in hexadecimal, rgb and rgba.
Retrieved Nov 03, 2024, from
https://disenowebakus.net/en/css-colors