HTML color palette

In the development environment, to display and display the desired color you need to know its code. Different programming languages and web (HTML, JavaScript, CSS) have their own formats, the most common being RGB, HSV and Hex. In turn, the W3C specification defines 16 primary and 130 shades of color names. To understand which format is written in a color code, you need to know how it is designated.

The palette of colors in HTML

RGB color code (Red,Green,Blue) is written in the form of (*, *, * ) in which the “*” indicates the amount of tone (red, green, blue) in a given color. Values range from 0 to 255.

There is also the RGBA (r,g,b,a) format, where the ‘a’ (alpha) parameter indicates support for an alpha channel to define the opacity of the object. This is between 0.0 (transparent) and 1.0 (opaque) – (150, 100, 200, 0.3).

HSV standard with the view (210, 79%, 34%) coordinates:

  • Hue – color tone in degrees from 0° to 360°;
  • Saturation – the saturation value in units of 0-1 or 0-100. The smaller is this parameter, the closer the color becomes to grayish neutral. The greater the value, the more saturated. This option is also called color purity;
  • Value – the color value, which sets the brightness. It is measured in units of 0-100 or 0-1.

Hex format is represented as three pairs of character values #ffa800, written in hexadecimal notation. The first pair denotes red saturation, the second pair denotes green saturation, and the third pair denotes blue saturation. Specified in units of 0 to 9 and English letters a to f.

Color Picker

With the HTML color picker you have the possibility to choose a suitable tone or enter values manually to check. The color code is displayed in RGB and Hex formats. The converter serves mainly for CSS.

See the Pen Colour Picker Tool by Test Lines (@RomanPenia) on CodePen.

The safe palette color table

The HTML specification defines 16 primary colors with names that can be used as keywords as values. There are also codes in Hex and RGB formats.

Color name Hex Color r g b
silver #c0c0c0 192 192 192
red #ff0000 255 0 0
black #000000 0 0 0
green #008000 0 128 0
blue #0000ff 0 0 255
yellow #ffff00 255 255 0
white #ffffff 255 255 255
gray #808080 128 128 128
maroon #800000 128 0 0
purple #800080 128 0 128
navy #000080 0 0 128
agua, cyan #00ffff 0 255 255
teal #008080 0 128 128
olive #808000 128 128 0
fuchsia, magenta #ff00ff 255 0 255
lime, lightgreen #00ff00 0 255 0

If you have any questions about the correctness of the converter – write your comments and suggestions.

Leave a Comment

Your email address will not be published.