Color Converter
Convert between HEX, RGB, and HSL in every direction. Type or pick a color once, all three formats stay in sync, ready to copy into your CSS, design file, or brand guide.
3 or 6 hexadecimal digits, with or without #.
Red, green, and blue from 0 to 255, with or without rgb().
Hue 0-360, saturation and lightness 0-100%, with or without hsl().
How to use this tool
- Click the color picker to choose a color visually, or type a value into the HEX, RGB, or HSL field.
- Whichever format you edit, the other two update automatically and the preview shows the result.
- Press Copy next to any format to copy a ready-to-use CSS value.
- Use Random color for inspiration or Reset to return to the default indigo.
HEX, RGB, and HSL explained
These three notations describe the same colors in different ways. Design tools, browsers, and brand guidelines each tend to favor a different one, so converting between them is a routine part of building a palette.
| Format | Example | Best for |
|---|---|---|
| HEX | #6366F1 |
CSS, design handoff files, and brand guides |
| RGB | rgb(99, 102, 241) |
Programmatic color work, canvas, and JavaScript |
| HSL | hsl(239, 84%, 67%) |
Building tints, shades, and hover states by hand |
Why HSL is useful for palettes
In HSL, lightness controls how close a color is to black or white, while saturation controls how vivid it is. Keeping the hue fixed and changing only lightness produces a consistent family of shades for buttons, borders, and hover states. When you convert a HEX or RGB value here, the HSL result shows those three controls so you can adjust them deliberately.
What this converter does not do
This is an opaque-color converter. Alpha transparency (four- and eight-digit HEX, rgba(), and hsla()) is intentionally out of scope, and named CSS colors such as rebeccapurple are not recognized. Enter HEX, RGB, or HSL values only.
Frequently asked questions
HEX is a base-16 notation used in CSS and most design tools, such as #6366F1. RGB describes the same color as three channels from 0 to 255, such as rgb(99, 102, 241). HSL describes it by hue (0-360 degrees), saturation (0-100%), and lightness (0-100%), such as hsl(239, 84%, 67%), which makes it easier to lighten, darken, or shift a color by hand.
No. This tool converts opaque HEX, RGB, and HSL values only. Four- and eight-digit HEX codes, rgba(), and hsla() are not accepted because an alpha channel has no direct equivalent in the three formats shown here.
HEX and RGB store 256 discrete levels per channel, while HSL is calculated from those levels and rounded to whole degrees and percentages. A round trip can therefore shift a channel by a small amount, typically one or two levels, which is not visible in practice. The HEX and RGB values shown are exact.
No. Every conversion runs locally in your browser with JavaScript. The color you pick or type is not transmitted or stored by BrightKit.
Yes. Each copy button produces a valid CSS color value, such as #6366F1, rgb(99, 102, 241), or hsl(239, 84%, 67%), which you can paste into a stylesheet, a design tool, or a brand guide.