How to use HEX RGB HSL
Read a CSS color in several standard forms so you can use the same color in a design handoff, theme or stylesheet.
- Paste a supported CSS color such as a named color, HEX, RGB or HSL.
- Convert and check the swatch and the specific representation you need.
Example input
rebeccapurple
Example use
Turn a named brand color in an older stylesheet into HEX for a new theme or obtain HSL to reason about lightness.
Output and compatibility
The available values reflect the CSS formats the browser tool parses. Output includes HEX, RGB, HSL and OKLCH; alpha needs to be carried separately or with a format that includes it.
Troubleshooting
If a CSS variable or newer color syntax is rejected, enter its resolved color value from the source design instead.
Use Image Color Picker if the color exists only in a local photo or screenshot.
Frequently asked questions
Can I get RGB from HEX?
Enter the HEX value and read the RGB result.
Can it choose an accessible foreground color for me?
Check candidates with Color Contrast Checker.