Web color reference
Look up a HEX color code, copy RGB values, or browse CSS color names. Start with the common color chart, then open a swatch for shades, palettes, conversions, and text contrast.
Enter a three- or six-digit HEX value to find its RGB, HSL, shades, and matching colors.
Need to choose a shade? Open the color picker or pick a color from an image.
Search these 20 CSS named colors by name, HEX, RGB, or HSL. Copy a value or open its swatch for more detail. CSS names are exact: green is #008000, while lime is #00FF00.
20 of 20
Browse the full CSS named color chart for more colors, or explore blue, green, and red color families.
A six-digit code uses the pattern #RRGGBB. Split #3B82F6 into 3B, 82, and F6: those pairs describe red, green, and blue. Hexadecimal uses the digits 0 to 9 and letters A to F; each pair represents a number from 0 to 255. This example converts to rgb(59, 130, 246).
#000000 has no red, green, or blue light, so it is black. #FFFFFF has all three channels at their maximum, so it is white. Letter case does not change the color: #ff0000 and #FF0000 are both red.
Three-digit shorthand doubles each digit: #F80 becomes #FF8800. Shorthand works only when each channel has matching digits. CSS also accepts #RGBA and #RRGGBBAA, with alpha at the end for transparency; our color detail URLs use the opaque six-digit RGB value. Read the guide to HEX, RGB, HSL, and alpha for the full notation reference.
Apply colors through CSS properties such as color for text, background-color for a surface, and border-color for an outline. For example:
.notice {
color: #FFFFFF;
background-color: #1E40AF;
border: 1px solid #1E3A8A;
}HEX and RGB represent the same channels in different ways; HSL is useful when adjusting hue, saturation, and lightness. Use HEX to RGB, RGB to HEX, or HEX to HSL to convert a value without guessing.
A code identifies a color, but a readable interface also depends on its background. Check the actual foreground and background pair in the contrast checker before using a swatch as text. Use labels or icons along with color to explain status.
Everyday CSS named colors with HEX, RGB, HSL, and OKLCH in one table.
HTML and library colors with hex pages, families, and contrast notes.
Official CSS named color keywords with copy-ready values.
The historical 216-color web-safe palette.
Official Tailwind CSS 50–950 scales.
Material Design shade tables with HEX and OKLCH.
Flat UI reference palettes with HEX, RGB, HSL, and OKLCH.
Legacy § chat codes, MOTD sequences, and matching HEX values.
ChatColor enums, § / & codes, and HEX for Bukkit plugins.
BrickColor IDs with RGB, HEX, HSL, and OKLCH conversions.
Reference sources: W3C CSS hexadecimal notation and MDN HEX color syntax. Chart values use CSS named colors; RGB and HSL are calculated from the same sRGB value.