Instantly convert between HEX, RGB, and HSL from a color picker or HEX code. Check the color in a large preview
A color can be written as numbers such as the strength of red, green, and blue light (0 to 255 each). See the color code guide for how the formats differ
Screen colors are split into the strength of three lights, red (R), green (G), and blue (B), and each is written as a number from 0 to 255 in 256 steps (256 x 256 x 256 gives about 16.77 million colors). Writing those three numbers in decimal gives RGB (for example, rgb(255, 0, 0) is red), and writing each as 2 hexadecimal digits gives HEX (for example, #ff0000). HSL describes a color by hue, saturation, and lightness, and printing uses CMYK, which expresses ink percentages. This tool converts between HEX, RGB, and HSL.
HEX and RGB are two ways of writing the same combination of red, green, and blue light. HEX uses the #rrggbb form, expressing each channel as a 2-digit hexadecimal value (00 to ff), and is widely used in CSS and design tools. RGB uses the rgb(r, g, b) form, expressing each channel as a decimal value (0 to 255). For example, white is #ffffff in HEX and rgb(255, 255, 255) in RGB, which refer to exactly the same color.
HSL describes a color by Hue (0 to 360 degrees), Saturation (0 to 100%), and Lightness (0 to 100%). Hue is the type of color (red, yellow, green, blue, and so on), saturation is how vivid it is, and lightness is how bright it is. Because it is intuitive for people to adjust, HSL is often used when building color schemes and themes. HSL can be converted internally to RGB, so the same color can also be expressed in HEX or RGB.
No. Entering a color and converting between HEX, RGB, and HSL all happen entirely in JavaScript inside your browser. The color or code you choose is never sent to or stored on a server.