ToolSprinkle.

Color converter

Convert 3- or 6-digit HEX to RGB and HSL for CSS. Compare exact sRGB channel values with rounded HSL and see a color preview.

Make the details count.
PROCESSED ON YOUR DEVICE

Ready when you are.

◎ No uploads. Your input stays here.↗ Free to use. No account needed.⌘ / Ctrl + Enter to run

A worked example

Using the default settings. You can try the same input in the workspace.

Input / settings

#6d4aff

Expected result

HEX: #6D4AFF
RGB: rgb(109, 74, 255)
HSL: hsl(252, 100%, 65%)
A LITTLE GUIDANCE

How to use Color converter

Enter a three- or six-digit HEX value, with or without #, and select Run tool. Read the normalized HEX, RGB and rounded HSL values beside the color preview. Copy copies all three lines, not just one CSS value.

Good to know

Input is HEX only, not RGB or HSL text. Supports opaque sRGB colors; no alpha, named colors, Display P3 or color-profile conversion. HSL is rounded to whole numbers.

A few quick answers.

Does this support alpha transparency?

This tool accepts three- or six-digit HEX colors without alpha. HSL values are rounded to whole numbers; use the HEX or RGB result when you need an exact color.

Is my input sent to a server?

No. This tool processes your input in your browser. We don't store your text, files or results. Standard website access logs are separate; read our privacy notes.

Can I use it for free?

Yes. No account, subscription or usage credits are required.

How do I keep my result?

Use Copy or Download after running the tool. Inputs are not saved automatically and disappear when you leave or refresh the page.

HEX, RGB and rounded HSL explained

Expand shorthand without changing the color

Each digit in a three-digit HEX value is repeated: #f80 becomes #FF8800, not #000F80. Both forms give rgb(255, 136, 0) and hsl(32, 100%, 50%). The # prefix is optional, letters are case-insensitive and surrounding whitespace is ignored. Four- and eight-digit alpha notation is not accepted.

Keep exact channel values when matching a design

The built-in #6d4aff example becomes #6D4AFF and rgb(109, 74, 255), which represent the same 8-bit sRGB color. The reported hsl(252, 100%, 65%) is rounded; converting that HSL back can produce slightly different RGB channels. Use HEX or RGB when exact matching matters rather than treating rounded HSL as a lossless round trip.

Understand neutral colors and unsupported inputs

Black #000 gives rgb(0, 0, 0) and hsl(0, 0%, 0%); white #fff gives rgb(255, 255, 255) and hsl(0, 0%, 100%). For neutral grays the displayed hue is 0 because hue has no visible effect at zero saturation. Entering red, rgb(255, 0, 0), an HSL expression or #ff000080 gives an error; this is not a general CSS color parser.

Move from a color value to a usable interface

Select the individual HEX, RGB or HSL value you need before pasting it into a CSS declaration. Copy and Download include the labels and all three representations as plain text. Use Contrast checker for foreground/background pairs, and inspect the result on the actual interface: this swatch does not simulate transparency, lighting, print output or every display.

Build a design check: normalize a HEX color, create a gradient background, then check text contrast. Use repeatable placeholder paragraphs to test the actual layout. Copy values before switching tools; no input is transferred automatically.

Method references: WCAG 2.2 minimum text contrast, enhanced text contrast, non-text contrast, and CSS linear-gradient direction and stops.

Keep your flow going.

More color & design ↗

What would you like to do?

↑ ↓ Navigate · Enter Open · Esc Close. Switching tools clears unsaved input.