LocalExcelTool
Get started

Color Converter

Convert a color between HEX, RGB and HSL instantly.

Runs in your browserNo account neededFree

What is Color Converter

A color converter translates a color between HEX (#RRGGBB), RGB (red-green-blue) and HSL (hue-saturation-lightness) representations.

🔒 Everything runs in your browser. Nothing is uploaded.

What this tool actually does with your file

Where it runs
In your browser, on this page
Upload
None — the file never leaves your device
Offline
Works with the network disconnected

Hex, RGB and HSL describe the same thing three ways

Hex and RGB are the same numbers in different notation: #3B82F6 is rgb(59, 130, 246). HSL re-expresses that triple as hue, saturation and lightness, which is far easier to reason about when building a palette — but it is a transform of the same sRGB values, not a different colour space.

The conversion is exact in the RGB-to-HSL direction and back, with rounding at the last step. Small drift (one unit in a channel) appears when round-tripping through HSL because the intermediate values are not integers; keep the source hex if exactness matters.

Why an HSL scale is not perceptually even

Equal steps in HSL lightness do not look like equal steps to the eye. Yellow at L=50% looks much brighter than blue at L=50%, because HSL is defined on the sRGB cube rather than on human perception. Building a 10-step palette by interpolating L therefore produces a scale with obvious jumps in the middle.

Perceptually uniform spaces — OKLCH, CIELAB — exist precisely to fix this, and are now supported in CSS via oklch(). For anything where the steps will be seen side by side, generating in OKLCH and converting to sRGB for output gives visibly smoother ramps.

The gamma question

sRGB values are gamma-encoded: the stored number is not the light intensity. Averaging two colours by taking the mean of their RGB values therefore produces a result that is darker than the visual midpoint, because the average happens in encoded space rather than in linear light.

The correct order for blending is decode to linear, mix, re-encode. Skipping the decode is why gradient blends between two saturated colours often show a muddy band in the middle, and why the same gradient looks different in a design tool that works in linear space.

How to use it

  1. 1.Enter a color
  2. 2.Click Run
  3. 3.Copy the format you need

How Color Converter works under the hood

Generators here produce values locally with the browser's cryptographic random source. The output is generated on your device, not issued by a server, so there is no record of what was generated.

  1. 1

    Seed from the platform CSPRNG

    Values come from crypto.getRandomValues, not Math.random, so they are suitable for passwords and tokens.

  2. 2

    Map to the requested alphabet

    Random bytes are mapped to the chosen character set while rejecting values that would bias the distribution.

  3. 3

    Render on the page

    The result is shown and can be copied; it is not stored or sent.

  4. Processing pipeline

Strength comes from length and source

A 20-character password from a 90-symbol alphabet has far more entropy than a 12-character one, and both are only as good as the random source. This site uses the platform CSPRNG, so the remaining risk is reuse, not generation.

Nothing is logged

Generated values are never transmitted, so there is no server log, no history and no recovery. Save what you need before closing the tab.

Verify it yourself

Generation is local. Reload the page and the values are gone.

  1. 1.Open DevTools on this page and switch to the Network tab
  2. 2.Keep the filter on Fetch/XHR and run the tool
  3. 3.Confirm no request carries your file — you should see only page assets and fonts

Frequently asked questions

What input formats work?

#RRGGBB, #RGB, rgb(r, g, b) or plain r, g, b.

Is data uploaded?

No. Conversion happens in your browser.

More in Generators