Image tool

Color Format Converter

Use this local converter for CSS authoring, design handoff or learning color conversions.

In-browser processingNo account requiredPrivacy details ↗

Opaque sRGB: HEX 3/6 digits; rgb numbers or percentages; hsl degree/grad/rad/turn hue and percent saturation/lightness. Legacy commas cannot mix RGB units. Alpha, names, none and wide gamut are unsupported. Numeric tokens are limited to 64 characters. Nonzero inputs or hue unit conversions that underflow to zero are rejected; JavaScript floating point precision still applies.

A QUICK WALKTHROUGH

How to use this tool

  1. Choose HEX, RGB or HSL and enter one opaque sRGB color.
  2. Choose a scenario, convert and compare the preview with rounded display values.
  3. Copy the full report or download its UTF-8 TXT; edit or reset to invalidate the old result.

Strict supported syntax

HEX accepts three or six digits, with or without #. RGB accepts three decimal numbers in 0–255 or percentages in 0–100%, including decimals and exponents. Space syntax may mix units; comma syntax requires one channel unit type. HSL accepts comma or space syntax, degree/grad/rad/turn hue, and percent saturation/lightness in 0–100%. Hue wraps. Alpha, named colors, none, calc(), CMYK and wide gamut are outside this opaque subset. Out-of-range values are rejected rather than CSS-clamped.

Precision and reports

Conversions use gamma-encoded sRGB. The report retains the raw input, scenario, parsed channels with units, numeric RGB/HSL and all formats at JavaScript Number precision. HEX must round to 8-bit; the display rounds RGB to integers, hue to degrees and saturation/lightness to 0.1%. No ICC or perceptual accuracy is claimed. Numeric tokens are limited to 64 characters. Nonzero inputs or hue unit conversions that underflow to zero are rejected; JavaScript floating point precision still applies.

Local workflow

Processing, preview, copy and UTF-8 TXT export run in this browser. Scenario labels record your purpose and do not alter the mathematics. Editing, reset or navigation clears outdated results. Clipboard failure leaves a selectable report for manual copying.

GOOD TO KNOW

Common questions

Does it support transparency?

No. This tool accepts only opaque colors. Alpha and RGBA/HSLA syntax are rejected.

Why do display values differ from the report?

The display is rounded for reading; the report retains floating point values. HEX necessarily quantizes to 8-bit, so round trips can differ.

How do I export without clipboard permission?

Use Download TXT or select the report and copy it manually. Nothing is uploaded.