Skip to content

Colors

HTML Color Codes Reference

Browse the named HTML/CSS color chart with hex, RGB, and HSL values side by side, or convert any custom color between the three formats with a live picker.

Tool not available.

Popular HTML Color Codes

NameHexRGBHSL
Black#000000rgb(0,0,0)hsl(0,0%,0%)
White#FFFFFFrgb(255,255,255)hsl(0,0%,100%)
Dodger Blue#1E90FFrgb(30,144,255)hsl(210,100%,56%)
Crimson#DC143Crgb(220,20,60)hsl(348,83%,47%)
Forest Green#228B22rgb(34,139,34)hsl(120,61%,34%)
Orange#FFA500rgb(255,165,0)hsl(39,100%,50%)
Rebecca Purple#663399rgb(102,51,153)hsl(270,50%,40%)

How the Color Math Works

  1. Browse the named-color chart — every entry shows its hex, RGB, and HSL values at a glance.
  2. Click any swatch to load it into the converter panel.
  3. Use the color picker or type any hex/RGB/HSL value to convert between all three formats instantly.
  4. Copy any format to the clipboard as ready-to-paste CSS.
Formula & Technical Standard
Hex #RRGGBB pairs encode 0–255 per channel. RGB→HSL: H from max/min channel geometry, L = (max+min)/2, S from L. HSL→RGB inverts the same geometry.

Worked Example

Reading a design spec
Input: #1e90ff
Output: rgb(30,144,255) · hsl(210,100%,56%) · dodgerblue
The same color in the three formats CSS accepts — HSL is the friendliest when a designer asks for "same hue, a bit darker".
Adjusting lightness in HSL
Input: hsl(210, 100%, 56%) → 40% lightness
Output: hsl(210,100%,40%) = #0066cc
HSL keeps hue and saturation while changing lightness — the conversion shows exactly which hex that produces.

Common Questions

What is the difference between hex and RGB?

None functionally — hex is just a base-16 spelling of RGB. #1e90ff = rgb(30, 144, 255) because 1e₁₆ = 30. Choose whichever is more convenient; hex is more compact, RGB supports the rgba() alpha syntax in older codebases.

When is HSL the better format?

When adjusting colors by feel: lightness and saturation move predictably in HSL, while in hex "make it 10% darker" requires recomputing three channels. Design systems often store base colors as HSL tokens for exactly this reason.

Are all 140 named colors safe to use?

They are part of the CSS standard and render identically everywhere. The 16 original "HTML safe" names (aqua, black, blue…) are the oldest; the full set includes grays like rebeccapurple added by CSS Color Level 4.