Loading the interface. JavaScript is required; controls stay disabled until ready.
One color. Three formats.
Paste a color to get its HEX, RGB and HSL values, ready to copy.
Your color values
PreviewSupports solid colors without transparency. HSL values are rounded to two decimal places.
How to use
Enter HEX, rgb(r, g, b), or hsl(h, s%, l%). Convert and inspect the preview. Copy the format you need.
Examples & use cases
Red: #FF0000 = rgb(255, 0, 0) = hsl(0, 100%, 50%).
About this tool
A canonical 8-bit RGB representation drives every output. Accepts three- or six-digit HEX, integer RGB channels 0–255, and HSL hue 0–360 with percentages 0–100. HSL output rounds to two decimals. Alpha, named colors and CMYK/LAB are not supported.
Questions & answers
Why can HSL change slightly after conversion?
Colors are quantized to 8-bit RGB channels. HSL is then calculated from that same canonical color and rounded to two decimal places, avoiding repeated chained conversions.
Compare equivalent color representations
HEX, RGB and HSL are different ways to express a supported screen color. HEX packages the red, green and blue channels in hexadecimal; RGB gives the channels directly, while HSL describes hue, saturation and lightness.
A practical example
Pure red is #FF0000, rgb(255, 0, 0) and hsl(0, 100%, 50%). A three-digit HEX value such as #F00 expands to the same RGB channels. These equivalences describe a color value; they do not guarantee that every monitor or print process displays it identically.
Use the supported input ranges
RGB channels are integers from 0 to 255. HSL accepts hue from 0 to 360 and saturation/lightness percentages from 0 to 100. The canonical representation is 8-bit RGB, so conversions involving fractional values can round. HSL output is displayed to two decimal places rather than retaining unlimited precision.
Separate color conversion from contrast testing
This converter does not support alpha, named colors, CMYK or LAB. It also does not certify text contrast or accessibility. A color that converts correctly can still be hard to read against a chosen background. Check the final foreground/background pairing with an appropriate contrast method before using it in a design.
Worked example: matching a brand color across tools
A designer sends the brand color #1E73BE. Converted, that is rgb(30, 115, 190) for CSS, and roughly hsl(208, 73%, 43%). The HSL form is the useful one for building a palette: keep the hue at 208, raise lightness to 90% for a pale background tint, or drop it to 30% for a hover state. All three notations describe the same on-screen color in the sRGB space, so the choice is about readability, not accuracy.
More questions about the Color Converter
Is HEX or RGB better for CSS?
Neither is more accurate; browsers treat #FF5733 and rgb(255, 87, 51) identically. HEX is shorter and common in design handoffs, while RGB and HSL are easier to adjust by hand and accept an alpha value for transparency. Many teams store HEX in design tokens and use HSL when they need lighter and darker variations of one hue.
Why does my converted color look different in print?
Screens mix red, green and blue light, while printers mix cyan, magenta, yellow and black ink. Some bright screen colors, especially vivid blues and greens, cannot be reproduced in CMYK. For print work, ask the printer for their CMYK or Pantone values instead of relying on a screen conversion.
What does a three-digit HEX code mean?
It is shorthand where each digit is doubled. #3AF expands to #33AAFF. Shorthand only works when both digits of each channel match, so a color such as #1E73BE has no three-digit form. An eight-digit HEX code adds two digits for opacity, where FF is fully opaque and 80 is about 50 percent.
Choose your next task
- Image resizer: Prepare image dimensions separately from color values.
- HTML entity converter: Escape HTML text separately from CSS color notation.