HEX, RGB and HSL cards connected by one coral glass sphere.

ONELESS / COLOR

Color Converter

HEX, RGB and HSL are different ways to describe an sRGB color. Color Converter puts those representations beside the same preview so a format change stays connected to the color itself. Alpha is preserved rather than silently replaced with an opaque value.

Open Color Converter. JavaScript powers the workspace; the full guide is available below.

UNDERSTAND THE RESULT

Color, with a little context.

Supported input is explicit

Use 3/4/6/8-digit HEX, absolute RGB/RGBA, HSL/HSLA or a CSS named color. Modern space-separated forms with a slash alpha are supported, alongside comma syntax. Relative colors, variables, color-mix(), Lab, OKLCH and Display P3 are not inputs for this release.

Precision and rounding

HEX uses 8-bit channels, so fractional RGB values and alpha may round. RGB output keeps up to three decimals and HSL keeps three decimals. Repeatedly converting rounded copies can create small differences.

Alpha changes the visible result

The preview uses a checkerboard behind transparent colors. The copied color retains its alpha and will blend with the destination background; the checkerboard itself is never copied.

HOW TO USE IT

From a starting point to a usable result.

  1. Paste a HEX, RGB, HSL or named color into Color value. The examples provide valid starting points.
  2. Read the three equivalent outputs. A clear error replaces results when the input is unsupported or outside the allowed ranges.
  3. Copy one result card or Copy all values. Use the target application’s supported syntax.

A WORKED EXAMPLE

One teal, three descriptions

Enter hsl(180 100% 25%). The HEX result rounds to #008080; the unrounded RGB channels are 0, 127.5, 127.5. Enter rgb(0 128 128 / 50%) to include transparency, producing #00808080.

EVERYDAY USES

Make the next small decision easier.

Move a design value into CSS

Convert a named color or HSL value into the form your stylesheet uses. The preview helps catch an unintended channel or hue.

Understand an alpha HEX

Paste an eight-digit value to see its opacity reflected in RGB and HSL. This is useful when a color appears different against another background.

LOCAL WORKSPACE

Your work stays in this browser.

The tool processes color values locally. It does not upload the input to a processing server or save it in browser storage. Leaving or reloading the page clears the working state. Copying places the selected result on your clipboard; sharing sends only the page address without your working values.

These tools describe sRGB colors. Browser decoding, color management and the display can affect what you see; they are not an ICC proofing workflow or a print-color guarantee. Read the site privacy policy for information about the surrounding website.

KEEP IT NEARBY

One less search next time.

Press Ctrl + D on Windows or Command + D on Mac to bookmark this page. Your browser may also offer Create shortcut or Add to Home Screen. Shortcuts open the tool; they do not include your colors or images.

Adding a OneLess browser shortcut

Choose a shortcut icon

QUESTIONS, ANSWERED

A few useful details.

Why was an out-of-range value rejected?

This tool rejects RGB channels outside 0–255 or 0–100%, saturation/lightness outside 0–100%, and alpha outside 0–1 or 0–100%. It does not silently clamp invalid authoring input. Hue can wrap around the circle.

Can I convert CMYK here?

This tool handles sRGB representations. CMYK to RGB and RGB to CMYK provide separate profile-free estimates. For print-color matching, use a color-managed workflow with the appropriate ICC profile.

Are all CSS colors supported?

Absolute HEX, RGB, HSL and standard named colors are supported. Context-dependent values such as currentColor, system colors, CSS variables and relative syntax are not.

Why can an alpha value change slightly in HEX?

HEX alpha has 256 possible byte values. For example, half opacity rounds to 128/255, while decimal alpha can represent exactly 0.5.

Does converting HEX to RGB change the color?

For an opaque sRGB color, HEX and RGB are different ways to write the same channels. A different-looking result usually comes from rounding, alpha handling or the environment displaying it.

What does a short HEX code such as #369 mean?

Each digit is repeated: #369 expands to #336699, which is rgb(51, 102, 153). Shorthand is possible only when each channel’s two HEX digits match.

Which output should I paste into a stylesheet?

Use a supported CSS color value such as HEX, rgb() or hsl(). Preserve the alpha channel when transparency is intentional; removing it makes the value opaque.

REFERENCES

CSS color values — MDN

ANOTHER SMALL STEP

Keep the next tool close.

Explore Color Tools ↗

Ready for a little more color?

One color, ready in HEX, RGB and HSL.

Return to Color Converter ↑