Processed on your device

Color converter

Convert a color between HEX, RGB and HSL: type it in any of the three notations and get all three.

1

Make it yours

Type #RGB, #RRGGBB, rgb(r, g, b) or hsl(h, s%, l%).
No uploads

Ready. The result updates as you change the values.

2

Your result

The result for the example values above.

HEX#7357d9
RGBrgb(115, 87, 217)
HSLhsl(252.92, 63.11%, 59.61%)

About color converter

Type a color the way you have it and read it in the 2 other notations. A HEX code from a design file or a style sheet becomes RGB values for an app or a programming library, and HSL values for building lighter or darker versions. RGB or HSL values from a color picker or a style guide become the HEX code that CSS, HTML and design tools use. All 3 results are written the way CSS accepts them.

How it works

StillKit reads #RGB or #RRGGBB as hexadecimal digits, rgb(r, g, b) as 3 whole numbers from 0 to 255, and hsl(h, s%, l%) through the HSL formulas that CSS uses. Whatever you typed becomes red, green and blue channels, and all 3 results come from those. So #7357d9 gives rgb(115, 87, 217) and hsl(252.92, 63.11%, 59.61%), and hsl(253, 63%, 60%) gives #7559d9.

Tips

  • A 3-digit code such as #fa0 is shorthand for #ffaa00. Capitals and a missing # make no difference, and the HEX result is written in lowercase.
  • Commas are optional, so rgb(115 87 217) and hsl(253 63% 60%) work too. Inside rgb(), percentages and decimals are rejected: for 50%, type 128.
  • For channel values from 0 to 1, as some graphics code uses, multiply each by 255 and round before you type them.
  • Grays, white and black have no hue, so their HSL line shows 0 for hue and saturation.
  • Hue is an angle on the color wheel: 0 is red, 120 green and 240 blue, and 360 is red again. Lightness 0 is black and 100 is white, whatever the hue.
GOOD TO KNOW

Limits

Solid colors only: a transparency value, as in #7357d980 or rgba(), is not read. RGB channels are whole numbers from 0 to 255, hue runs from 0 to 360, and saturation and lightness from 0 to 100. An HSL color is rounded to the nearest color that HEX can hold, and the HSL result keeps 2 decimals.

How tools run on your device →

Questions and answers

Why did the HSL values I typed change in the result?

HSL can describe more colors than 6 hexadecimal digits can hold. hsl(253, 63%, 60%) becomes the nearest such color, #7559d9, and the HSL line shows that color: hsl(253.13, 62.75%, 60%). Typing that line back gives the same HEX code.

Can I enter a color with transparency?

No. An 8-digit code such as #7357d980 and the rgba() and hsla() forms are rejected, because the tool works with solid colors. Convert the color without its transparency, then add the transparency back in your CSS.

Will the RGB values print in the same color?

Not exactly. RGB describes light from a screen, while printers mix inks, so very bright screen colors may print duller. This tool does not convert to CMYK, the ink values printers use.

Find your next shortcut

Search loads only when needed. Your search stays on your device.

Browse all categories and sections →