Type a tool name, for example "keyword density" or "transcript".
Enter RGB color values (0-255) to instantly convert to HEX, HSL, HSV, and CMYK formats.
Quick samples:
CSS Color Name
Black
Channel Breakdown
-
-
-
-
-
This RGB to hex converter turns red, green and blue values from 0 to 255 into a HEX color code, plus the matching HSL, HSV and CMYK values. Designers, developers and content creators can type numbers or drag sliders, watch a live color preview, and copy any format with one click.
An RGB to hex conversion rewrites a color from three decimal numbers into one six-character hexadecimal code. RGB describes how much red, green and blue light a screen mixes, each on a scale from 0 (none) to 255 (full). HEX stores the same three amounts in base 16, which is why web code such as CSS and HTML uses it so often.
The rule is simple. Convert each channel to base 16, make sure it has two characters, and join them in red, green, blue order behind a hash sign. Divide a channel by 16 to get the first character, and the remainder is the second. Base 16 uses the digits 0 to 9 and the letters A to F, where A is 10 and F is 15.
Each channel holds one byte, which has 256 possible values (0 to 255). In base 16 the largest byte is FF, so every valid HEX code has exactly two characters per channel. That is also why values above 255 or below 0 are not valid colors.
You can convert a color in a few seconds by setting the three channels and reading the results panel. Follow these steps.
If a field is left empty it counts as 0, and a number above 255 is pulled back to 255, so you always get a valid color.
The easiest way to understand the result is to follow one color through the conversion. Tap the Tomato sample, or enter R 255, G 99 and B 71.
Joined together, the HEX code is #FF6347. The tool also reports HSL as roughly 9, 100%, 64%, HSV as 9, 72%, 100%, and CMYK as 0, 61, 72, 0. In this example, the HSL saturation of 100% says the color is fully vivid, and the lightness of 64% says it sits a bit above the midpoint between black and white.
You would paste #FF6347 into a stylesheet as a text, border or background color. The color name line shows Tomato, which confirms you landed on a standard CSS named color.
Each output answers a different practical question, so pick the format that matches where you will use the color.
HEX is the six-character code with a leading hash, shown in uppercase. Use it in CSS, HTML, SVG, design apps and most website builders. If both characters of every channel repeat, such as #FFCC00, some code editors accept the short form #FC0, but the full form always works.
RGB repeats your input in CSS notation, which is handy when you need to add transparency in your own stylesheet. HSL gives hue (0 to 360 degrees around the color wheel), saturation and lightness as percentages. It is the easiest format for making a color lighter, darker or less intense: change only the lightness or saturation number and the hue stays the same.
HSV (hue, saturation, value) matches the way many graphic editors draw their color pickers. CMYK shows cyan, magenta, yellow and black percentages, which is a useful starting point when a printer asks for ink values. Treat the CMYK figures as a basic mathematical conversion, because printed color depends on paper, ink and the printer profile.
The three bars show how far each channel is from 0 to 255. Three bars of similar length mean a gray or near-neutral color. One long bar and two short ones mean a strongly tinted color, such as a bar for red that is full while green and blue are small.
These widely used values are handy for checking your own results or answering quick questions such as the RGB hex code for white or black.
| Color | RGB | HEX |
|---|---|---|
| White | 255, 255, 255 | #FFFFFF |
| Black | 0, 0, 0 | #000000 |
| Gold | 255, 215, 0 | #FFD700 |
| Brown | 165, 42, 42 | #A52A2A |
A quick rule: if all three channels are equal, the result is a gray, and the HEX code repeats one pair three times, like #808080.
Anyone who receives a color as three numbers but needs a web-ready code can use this page. These are typical situations.
If you only have the color on an image, grab it first with the image color extractor or pull a whole set with the color palette extractor, then bring the numbers here.
Most surprises come from a few small input mistakes, and each has a quick fix.
If you are not sure which color you want yet, choose it visually with the color picker and then use this page to double-check specific channel values.
This page converts opaque colors made of exactly three channels. It does not take an alpha (opacity) value, so there is no eight-character HEX output. If you need transparency, keep the HEX code from here and add the opacity in your own CSS, for example by using the RGB values with an alpha setting.
HSL, HSV and CMYK values are rounded to whole numbers. Converting a rounded HSL or CMYK value back can differ from the original by a point or two, so treat HEX and RGB as the exact pair. The page also does not convert colors for a specific monitor profile, so a color can look slightly different on different screens.
For code-based projects in Python or JavaScript, you can use the same rule shown above to build your own function, then use this page to test a few known colors and confirm your output.
Set the red, green and blue values above, check the live preview, and copy the HEX, HSL, HSV or CMYK code you need. For more ways to work with images and colors, browse the image editing and optimization tools, or build a matching site icon with the favicon generator once your brand color is set.
Your report has been submitted. We will look into this issue.
A VPN changes your network exit. It does not guarantee anonymity.
Themes, plugins, code, video, audio, graphics & more from 90,000+ authors.
Web Development
Design & Media
Unlimited Access
Explore Envato Market