Convert between HEX, RGB, and HSL color codes, then package the result into copy-friendly snippets you can share.
RGB cleanup from design is normalized into copy-friendly HEX, RGB, HSL, and token snippets.
Use dark text on this swatch for the strongest small-text contrast.
:root {
--brand-accent: #FF5733;
--brand-accent-rgb: 255 87 51;
}
{
"color": {
"accent": {
"value": "#FF5733",
"rgb": "255 87 51",
"hsl": "hsl(11, 100%, 60%)"
}
}
}
background-color: #FF5733; color: #111827;
Colors on the web can be represented in multiple formats. HEX uses hexadecimal notation (#RRGGBB), RGB specifies red, green, blue components (0-255), and HSL uses hue (0-360), saturation, and lightness (0-100%). Each format has advantages for different use cases like design work or programmatic color manipulation.
HEX colors encode RGB values in hexadecimal (16-255 per channel). RGB directly specifies color intensity (0-255). HSL separates color (hue) from intensity (saturation/lightness), making it more intuitive for creating color variations. All formats can represent the same 16.7 million colors.
HSL is better when you need to create color variations (lighter, darker, more/less saturated) as you can adjust a single component. RGB is better for color mixing and when working with image processing.
HEX shorthand uses 3 digits instead of 6 (#RGB instead of #RRGGBB). Each digit is doubled: #F00 becomes #FF0000 (red). Only works when each pair has identical digits.