b4rn1 · devtoolsdeveloper
Bin DV-06·Developer

Colour converter

Convert a colour between HEX, RGB and HSL, see a live swatch, and check whether text on it passes contrast.

BinDV-06
DepartmentDeveloper
Free runsUnlimited
Runs onYour device
Loading the tool…

The code for this tool is fetched only when you open it.

What colour converter does

Colour converter translates between HEX, RGB, HSL and HSV, and shows the contrast ratio against white and black. It is the design handoff step — a brand hex that has to become an rgb() value, or a text colour that has to pass an accessibility check.

How it works

Exact colour-space arithmetic: hex and RGB are the same numbers in different notation, HSL and HSV are derived by the standard piecewise formulas, and the contrast ratio uses the WCAG relative-luminance definition.

Runs on your device

Nothing is uploaded, because nothing needs to be: the browser already has a decoder, a canvas and an encoder. Close the tab and every trace of the file is gone, which is a stronger guarantee than any deletion policy.

Formats and limits

LimitsUnlimited. Alpha is supported where the notation allows it; the contrast figures follow WCAG 2.1 with the 4.5:1 and 3:1 thresholds labelled.
PriceFree, unlimited, no account

Worth knowing

  • Contrast ratio is the number that decides whether text is readable: 4.5:1 for normal text and 3:1 for large text are the WCAG AA minimums, and the ratio here is computed from the actual relative luminance rather than an eyeballed guess.
  • HSL is more useful than RGB when adjusting a palette, because lightness is a separate axis — a hue shift keeps the perceived brightness consistent.

Questions about colour converter

What contrast ratio do I need?

4.5:1 for body text and 3:1 for text at 24 px or bold 19 px and above, per WCAG AA. AAA raises those to 7:1 and 4.5:1.

Why do HSL and HSV give different numbers for the same colour?

They are different models. HSL treats a fully saturated colour at 50% lightness as the pure hue, while HSV puts the pure hue at 100% value. Both describe the same pixel.

Does it handle alpha?

HEX with alpha is parsed and shown as CSS rgba; the colour picker itself works in solid colours.

Where is my file processed?

No. There is no upload step and no server-side copy: the browser decodes and re-encodes the file in this tab, and the network carries nothing about it.

Will it run on a plane?

Once the page has loaded, yes — the processing code runs locally and no further request is needed. The first load has to come from the network like any page.

Do I have to sign up?

Free with no account and no daily limit — counting and calculating are not metered, because they cost nothing to run.

HEX, RGB and HSL colour converter with contrast check · b4rn1