Generate

Color formats explained

HEX, RGB, HSL, HSV, and HWB can describe the same screen color in different ways. CMYK describes inks for print. Here is what each number means, when to use it, and how to change a color without starting over.

See the example color #A03623

HEX

#A03623

Read it as three pairs: A0 is red, 36 is green, and 23 is blue. Each pair ranges from 00 to FF. Use HEX when a theme editor asks for a color code or when you want to paste a brand color into CSS.

RGB Red, green, blue

rgb(160 54 35)

These are the same three channels as HEX, written in ordinary numbers from 0 to 255. This color contains more red than green or blue. Use RGB when a tool asks for separate channels, or add / 60% inside the parentheses for 60% opacity in CSS.

HSL Hue, saturation, lightness

hsl(9.1 64.1% 38.2%)

Hue picks a position on the color wheel. Saturation controls how far the color is from gray at that lightness. Lightness runs from black at 0% to white at 100%. Keep hue and saturation fixed and raise lightness for a lighter version of the same hue.

HSV Hue, saturation, value

9.1°, 78.1%, 62.7%

Also called HSB, with B for brightness. Value measures the strongest RGB channel, so here it is 160 out of 255, or about 62.7%. Value and saturation use different scales from HSL. You may see HSV in a color picker. Convert it to HEX, RGB, or HSL before pasting into CSS.

HWB Hue, whiteness, blackness

hwb(9.1 13.7% 37.3%)

Start with a pure hue, then mix in white and black. Here the last two numbers are the white and black shares of the mix. Increasing whiteness makes the color paler. Increasing blackness makes it darker. CSS uses spaces between HWB values.

CMYK Cyan, magenta, yellow, black

0%, 66.3%, 78.1%, 37.3%

These percentages describe four printing inks. This example is a rough conversion. Paper, ink, and the printer’s color profile affect the result. Ask the printer for its preferred profile or proof when a close match matters. For website styling, use a screen format such as HEX.

Try changing the color

Start by moving Lightness while leaving the other sliders alone. Then try lowering Saturation to see what makes the same hue look muted.

hsl(9.1 64.1% 38.2%)

Put it into your own site

In a theme editor, paste #A03623 into the color field. In CSS, color changes the text and background-color changes the surface behind it. If you want to keep the hue easy to adjust later, save the HSL value in a CSS variable.

:root {
  --brand-color: hsl(9.1 64.1% 38.2%);
}

.site-banner {
  background-color: var(--brand-color);
  color: #FFFFFF;
}

After editing the text or background color, check the contrast between them.

References: W3C CSS Color and Adobe’s color panel guide.