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).

CSS colors - Code in hexadecimal, rgb and rgba | Learn CSS | 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 Dec 10, 2024, from
https://disenowebakus.net/en/css-colors

Participates!

Share it with your friends in Social Networks!

Professor at the University of Guadalajara

Hugo Delgado Desarrollador y Diseñador Web en Puerto Vallarta

Professional in Web Development and SEO Positioning for more than 10 continuous years.
We have more than 200 certificates and recognitions in the Academic and Professional trajectory, including diploma certificates certified by Google.

CONTINUE LEARNING

IT ALSO DESERVES TO PAY TO VISIT:

Not finding what you need?

Use our internal search to discover more information
Related content:

Would you like to learn more about Web Design?

Meet all the courses and tutorials that we have for you completely free
Learn Web Design
 

Leave your Comment

SPONSOR

Your business can also appear here. More information

Your browser has blocked advertising.
Please 🙏 Allows you to view the ads to access, thank you.