Step 1
Open [Color Converter](/tools/color-converter).
Loading workspace...
Preparing your tools
Guide
Convert HEX colors to RGB or HSL, preview the result and understand contrast, rounding and design-token consistency.
A design file may specify a HEX color while a component's CSS uses HSL or RGB. Color Converter helps translate supported color values without recalculating channels manually. It also offers a live swatch, which is useful for checking whether the input is approximately the color intended.
The converter does not choose accessible color combinations, generate brand strategy or tell you whether a palette meets contrast requirements. Those are separate design decisions.
Open [Color Converter](/tools/color-converter).
Enter a supported HEX, RGB or HSL value, such as `#336699`.
Run the conversion and inspect the equivalent values in the other formats.
Compare the preview against your reference mockup.
Copy the target representation into a component stylesheet or design-token file.
#336699.For the example #336699, the RGB channels are 51, 102 and 153. The equivalent HSL representation is approximately 210 degrees hue, 50% saturation and 40% lightness. The values describe the same nominal sRGB color using different coordinate systems.
Six-digit hexadecimal notation lists red, green and blue channels as two hex digits each. RGB uses decimal channel values, usually from 0 to 255 in its common legacy syntax. HSL expresses hue, saturation and lightness, which can make some color adjustments easier to reason about.
The formats are not different image files. They are ways to express a color in CSS and design tooling. When converting, be aware that rounding can slightly change the displayed numbers. Always keep a single source of truth for a design token instead of repeatedly converting back and forth.
A bright accent color that looks attractive in a swatch may be hard to read as small text on a similar background. Use a contrast checker and evaluate normal text, large text, focus indicators and interactive states separately. HSL lightness is not equivalent to perceptual lightness, so changing it by ten points does not guarantee a predictable contrast improvement.
If you are designing a family of related colors rather than converting one existing color, use Color Palette Generator to explore harmony-based options before testing accessibility.
If an input is rejected, check that it uses a supported syntax, complete HEX digits and in-range channel values. If a design editor shows a different color, verify its color profile and the rendering environment. CSS sRGB representations can differ from device-managed wide-gamut previews. A missing alpha channel also matters when comparing translucent overlays.
Continue your workflow with these matching tools.
Related, practical walkthroughs for the tools used in this guide.
Explore complementary, analogous and other color harmonies, copy HEX and CSS tokens, then test accessibility in real UI components.
Read the guide →
Reduce CSS whitespace and comments while checking quoted values, selectors, responsive rules and actual browser rendering.
Read the guide →
Format CSS selectors, braces and declarations for review; understand comments, media queries and the limits of text-based formatting.
Read the guide →
Upload your file and apply these settings in under a minute.