Convert a color to every format

Convert a color among common CSS notations while preserving its channels.

freeworks offlinenothing uploaded
ToolAll Color Formats
Input
Output
Put this on your own site

The frame below runs the same code as this page, in the reader's own browser. Nothing is sent to us, and nothing is sent to you.

Pick a dark background and the text and panels follow it, so the frame stays readable on a dark page.

Preview

How it works

A color is parsed into a normalized internal representation, then serialized into requested CSS forms such as hexadecimal, rgb(), hsl(), and modern color() notation. Conversion preserves the selected color space and alpha where the target format supports it.

  • CSS syntaxes expose different channel models and gamut behavior.

Worked example

Convert Coral
View a hex color in all supported formats
Input
											#FF6B6B
										
Output
												Hex: #FF6B6B
RGB: rgb(255, 107, 107)
HSL: hsl(0, 100%, 71%)
HSV: hsv(0, 58%, 100%)
CMYK: cmyk(0%, 58%, 58%, 0%)
											

When to use this

Design tokens, legacy stylesheets, and picker output convert CSS color formats.

Edge cases

  • Short hexadecimal notation cannot represent every channel value exactly.
  • HSL hue is undefined for neutral gray colors.
  • A wide-gamut color may need clipping when serialized to sRGB.

References