Zero Signup ToolsFree browser tools

Converter Tools

Color Format Converter

Paste any CSS color and convert it to HEX, RGB, RGBA, HSL, HSLA, HWB, CMYK, and named colors at once. Auto-detects the input format with a live preview.

Detected: HEX

Try a sample

Live preview

R G B

59, 130, 246

Alpha

1

Luminance

23.5%

All formats

Copy any single value or grab the lot from the bundle below.

  • HEX

    #3B82F6

  • HEX with alpha

    #3B82F6FF

  • rgb()

    rgb(59, 130, 246)

  • rgba()

    rgba(59, 130, 246, 1)

  • hsl()

    hsl(217.22, 91.22%, 59.8%)

  • hsla()

    hsla(217.22, 91.22%, 59.8%, 1)

  • hwb()

    hwb(217.22 23.14% 3.53%)

  • cmyk()

    cmyk(76.02%, 47.15%, 0%, 3.53%)

  • CSS variable

    --brand-color: #3B82F6;

  • Tailwind utility

    bg-[#3b82f6]

Bundle

HEX:    #3B82F6
HEX8:   #3B82F6FF
RGB:    rgb(59, 130, 246)
RGBA:   rgba(59, 130, 246, 1)
HSL:    hsl(217.22, 91.22%, 59.8%)
HSLA:   hsla(217.22, 91.22%, 59.8%, 1)
HWB:    hwb(217.22 23.14% 3.53%)
CMYK:   cmyk(76.02%, 47.15%, 0%, 3.53%)
CSS:    --brand-color: #3B82F6;
TW:     bg-[#3b82f6]

Supported formats

  • HEX: #RGB, #RGBA, #RRGGBB, #RRGGBBAA
  • rgb() and rgba() with integer or percentage channels
  • hsl() and hsla() with deg, rad, turn, or grad hue units
  • hwb() with hue plus whiteness and blackness
  • cmyk() with cyan, magenta, yellow, and black percentages
  • 148 named CSS colors plus transparent

Conversions run in your browser. Nothing is uploaded.

How to use

  1. Paste a color in any supported format: a HEX value with or without a #, rgb()/rgba(), hsl()/hsla(), hwb(), cmyk(), or a named CSS color like tomato or rebeccapurple.
  2. The tool auto-detects what you typed and shows the parsed result on a checker background so transparency is visible.
  3. Copy any single format from the All formats grid, or use Copy all to grab a multi-line bundle of every format at once.
  4. Try the sample buttons (HEX, rgb(), hsl(), hwb(), Named, and more) to see how each input looks in every other format.
  5. Use Clear to reset the input and start fresh.

About this tool

Color Format Converter takes any CSS color value you paste and converts it into every other common format at once. The tool auto-detects what you typed (HEX, rgb(), rgba(), hsl(), hsla(), hwb(), cmyk(), or a named CSS color), parses it into a canonical sRGB representation, and then emits the value in 6-digit HEX, 8-digit HEX with alpha, the short 3 or 4 digit HEX form (when each pair repeats), legacy and modern rgb()/rgba(), hsl()/hsla() with degree-based hue, hwb() with whiteness and blackness, cmyk() approximated through sRGB, and the closest matching named CSS color when one exists. Hue angles are accepted with or without a unit (deg, rad, turn, grad), saturation, lightness, whiteness, and blackness use percentages, and rgb() channels accept either 0 to 255 integers or 0% to 100% percentages. Modern space-separated CSS Color Module Level 4 syntax (with a / before alpha) and the older comma-separated form are both parsed without configuration, so anything you copy from a design tool, browser inspector, or stylesheet just works. The result panel shows a live swatch on a checker background so transparency is obvious at a glance, and the bundle block joins every format into one block of plain text that copies cleanly into a variable file or design hand-off. Each row has its own copy button, plus the tool emits a ready-made CSS custom-property declaration and a Tailwind v3+ arbitrary-value utility class so you can drop the color straight into a stylesheet or markup. Useful for design hand-offs, theming, dark-mode work, comparing what a color looks like in different spaces, sanity checking print-targeted CMYK, and finding the named CSS equivalent for accent colors. Everything runs in your browser. Pasted values, design tokens, and brand colors never leave your device.

Free to use. Works in your browser. No signup, no login.

Related tools

You may also like

All tools
All toolsConverter Tools