Color · Made a little simpler

CSS Color Format Converter

Convert sRGB colors between HEX, RGB, HSL, HWB and HSV or HSB. Inspect alpha, copy individual values and save a set of swatches as CSS or JSON.

Free to useNo account neededProcessed on your device
Your workspaceProcessed on your device
#7D9065rgb(125, 144, 101)

Preview composited on white. HEX stores alpha in 8 bits; decimal alpha is retained in RGB and HSL.

HEX#7D9065
RGBrgb(125, 144, 101)
HSLhsl(86.512 17.551% 48.039%)
RGB percentrgb(49.02% 56.471% 39.608%)
Normalized RGBA0.4902, 0.5647, 0.3961, 1
CSS variable--color: #7D9065;
HEX8#7D9065FF
HWBhwb(86.512 39.608% 43.529%)
HSV / HSBhsv(86.512 29.861% 56.471%)

Color names use standard CSS keywords, such as red or rebeccapurple.

Calculator source: CalcOpenly

Add this tool to your website

Paste this code into your page to add the tool and a visible ToolMellow credit link.

HTML embed code
Preview embed

CSS Color Format Converter: how to use it

  1. Enter a CSS color name, HEX code or numeric color function. For HSV use hsv(210 67% 60%).
  2. Inspect the RGB, HSL, HWB, HEX8 and HSV results. Adjust a channel to see how the values relate.
  3. Copy a single format or save swatches and download the collected colors as CSS or JSON.

Limits and notes

Works in 8-bit sRGB. Numeric alpha remains decimal in functional outputs and rounds to one byte in HEX8. HSV and HSB are design-tool notation. CSS variables, wide-gamut profiles and relative color expressions require other workflows.

How your privacy works →

CSS Color Format Converter: common questions

How do I convert HSL to HEX?

Enter hsl(210 50% 40%). Its RGB channels are 51, 102 and 153, and the HEX result is #336699.

Is HSB different from HSV here?

Brightness and value name the same channel. Both input spellings accept a hue, saturation percentage and value percentage.

Guides