Color code converter
Convert colors between HEX, RGB, and HSL as you type. Pick a color with the color picker or paste a code, copy any of the three formats in one click, and use it in your designs and your CSS.
In the HEX field you can type #7C3AED, 7C3AED, or the short form #F00. In the RGB field, three numbers such as "124, 58, 237" are enough; values above 255 are capped at 255. The HSL field shows the result and cannot be edited.
You have your result. What's next?
53 paid orders in the last 30 daysThree concrete steps for organic growth
- Use one clear username and bio so you are the same identity on every platform.
- Posting on a weekly rhythm grows an account more reliably than a single viral attempt.
- Leave one call to action in each piece of content; an undecided viewer drifts away.
Turkish Instagram Followers: Starts after payment, delivered gradually
How do you use the color code converter?
- 1Pick or paste a color
Tap the color picker box and choose visually, or paste the code you have into the HEX field. Typing three numbers into the RGB field works too.
- 2Read all three formats
The HEX, RGB, and HSL fields fill in at the same time. The preview box on the right shows the color large, and the badge carries the HEX code.
- 3Check the Brightness card
The Brightness card in the result column tells you whether the color is dark or light and whether white or dark text belongs on top of it.
- 4Copy
The Copy button next to each field puts that format on your clipboard. Copy result in the bottom bar copies all three formats together.
- 5Build lighter and darker shades
Use the HSL rule from the guide to find lighter and darker shades of the same color; give your team the HEX code and your CSS whichever format you prefer. Reset brings back the default purple.
HEX, RGB, and HSL conversion formulas
The tool calculates all three formats from the same source: it first turns the color into RGB, then derives HEX and HSL from RGB. Rounding only happens in HSL and in the brightness value.
#RRGGBB → R = RR₁₆, G = GG₁₆, B = BB₁₆ (0-255)each channel as two hexadecimal digits, uppercase(max + min) / 2 (channels as 0-1)d / (max + min) if L ≤ 0.5, otherwise d / (2 − max − min)0-360° based on the largest channel, in 60° sectors0.299 R + 0.587 G + 0.114 B; below 128 is darkd is the difference between the largest and the smallest channel. H, S, and L are rounded to whole numbers, so converting back from HSL can be off by a unit or two. A short HEX code (#F00) is first expanded to #FF0000.
Sample color code conversions
The rows below match the tool's calculation exactly; paste the HEX code and you will see the same RGB, HSL, and brightness values.
| Color | HEX | RGB | HSL | Brightness |
|---|---|---|---|---|
| TakipOX purple | #7C3AED | rgb(124, 58, 237) | hsl(262, 83%, 58%) | 98, dark |
| Coral | #FF5733 | rgb(255, 87, 51) | hsl(11, 100%, 60%) | 133, light |
| Midnight navy | #1E1B3A | rgb(30, 27, 58) | hsl(246, 36%, 17%) | 31, dark |
| Rose red | #F43F5E | rgb(244, 63, 94) | hsl(350, 89%, 60%) | 121, dark |
| Emerald | #10B981 | rgb(16, 185, 129) | hsl(160, 84%, 39%) | 128, light |
| Sky blue | #0EA5E9 | rgb(14, 165, 233) | hsl(199, 89%, 48%) | 128, light |
| Sand beige | #E9E1D4 | rgb(233, 225, 212) | hsl(37, 32%, 87%) | 226, light |
The Brightness column is the result of the perceived brightness formula, rounded to a whole number; 128 and above counts as light, and dark text is suggested on top. Vivid colors such as rose red can look light to the eye yet come out dark in the formula; in that case white text is easier to read.
HEX and RGB codes of common colors
Standard colors have fixed codes; paste any of them into the tool to check. The names in parentheses are the matching CSS color keywords, which matter in one case: in CSS, the keyword green means #008000, not the pure green #00FF00.
| Color | HEX | RGB | HSL |
|---|---|---|---|
| White (white) | #FFFFFF | rgb(255, 255, 255) | hsl(0, 0%, 100%) |
| Black (black) | #000000 | rgb(0, 0, 0) | hsl(0, 0%, 0%) |
| Red (red) | #FF0000 | rgb(255, 0, 0) | hsl(0, 100%, 50%) |
| Pure green (lime) | #00FF00 | rgb(0, 255, 0) | hsl(120, 100%, 50%) |
| Green (green) | #008000 | rgb(0, 128, 0) | hsl(120, 100%, 25%) |
| Blue (blue) | #0000FF | rgb(0, 0, 255) | hsl(240, 100%, 50%) |
| Yellow (yellow) | #FFFF00 | rgb(255, 255, 0) | hsl(60, 100%, 50%) |
| Cyan (cyan, aqua) | #00FFFF | rgb(0, 255, 255) | hsl(180, 100%, 50%) |
| Magenta (magenta, fuchsia) | #FF00FF | rgb(255, 0, 255) | hsl(300, 100%, 50%) |
| Orange (orange) | #FFA500 | rgb(255, 165, 0) | hsl(39, 100%, 50%) |
| Gray (gray) | #808080 | rgb(128, 128, 128) | hsl(0, 0%, 50%) |
Ways to find a color code compared
You can convert a color with this tool, by hand, or in a design app's own color panel. Here is when each one makes sense.
| Criterion | This tool | Converting by hand | A design app's color panel |
|---|---|---|---|
| Speed | Paste once, see all three formats | Hexadecimal math, several minutes | Right away |
| Install and account | None | None | An app, and usually an account |
| Use on a phone | A browser is enough | With a calculator | Depends on the mobile version |
| HSL value | Automatic | Long formula | Available in most |
| Picking a color from a screenshot | System color picker only | No | Eyedropper tool |
| Palettes and shades | You derive them with HSL | Tedious | Built-in palette tools |
| Sharing with a team | All three formats in one copy | Typed out | Shared files or styles |
If you already work in a design app, its eyedropper and palette tools go further; for converting a code and sharing it quickly, this tool is enough.
Who uses the color code converter and how
Typical ways to use the tool, grouped by who needs the color.
The print shop's file lists the logo color as rgb(244, 63, 94). Paste it into the RGB field and the HEX field shows #F43F5E. The Brightness card reads 121 with "dark color, white text works".
How to use it: enter the HEX code in the Story template and keep the text white.Type #0EA5E9 and the tool returns hsl(199, 89%, 48%). Work through the steps in the formula block by hand first, then compare your answer with the tool.
How to use it: do the math yourself and use the tool as the answer key.Enter each client's HEX code in turn and use Copy result in the bottom bar to paste all three formats into the brand document at once.
How to use it: designers read HEX, developers RGB, and everyone works from the same sheet.Pick the orange you like with the color picker, for example #F59E0B. The tool shows rgb(245, 158, 11) and hsl(38, 92%, 50%), and the Brightness card reads 167, light, so dark text sits well on it. Enter the values in your editing app.
How to use it: save the code once and reuse it on every thumbnail.Enter #E9E1D4: the brightness is 226 with "light color, dark text works". Paste the code into the custom color field of the Story highlight cover tool.
How to use it: beige background, dark gray labels, the same code on every cover.Choose #10B981 as the main color. Using the HSL rule from the guide, raise the lightness from 39 to 75 for a light shade and lower it to 25 for a dark one, and write them in CSS as hsl(160, 84%, 75%) and hsl(160, 84%, 25%).
How to use it: one hue, three shades, used across every post template.What are HEX, RGB, and HSL, and how do they differ?
Digital screens create color by mixing red, green, and blue light, and each format describes that mix in its own way. When you take the HEX code of a color you like in a design app and need to write it as RGB in CSS, or the other way around, working out the right value by hand is tedious. The tool turns the color you pick or paste into all three formats as you type.
HEX and RGB carry exactly the same information, so converting between them is lossless. HSL is a model closer to how people perceive color and involves rounding, which is why converting back from HSL can be off by a unit or two. None of the three formats carries transparency; for a see-through color, use rgba() or an eight-digit HEX code.
What is a HEX code, and how do you read it?
In hexadecimal, digits continue after 9 with the letters A, B, C, D, E, and F; FF equals 255 in decimal. #FF0000 is pure red: red at its maximum, green and blue at zero. #000000 is black and #FFFFFF is white. The three-digit short form (#F00) is valid too; the browser doubles each digit to expand it to #FF0000, and the tool follows the same rule.
HEX is the most common notation in web design and CSS because it is short, easy to copy, and supported by every browser. Uppercase or lowercase does not change the color; the tool writes it in uppercase for consistency. It also accepts a code without the leading hash sign.
How do you convert HEX to RGB?
The rule for hexadecimal conversion: multiply the value of the first digit by 16 and add the second digit. For 7C, 7 × 16 = 112, C = 12, for a total of 124. Doing it by hand is possible, but three channels take six steps, and one wrong letter changes the color completely. That is why sharing HEX codes within a team and using the tool when you need to convert is the safest habit.
Modern CSS supports rgba(), which adds a fourth channel for transparency; rgba(124, 58, 237, 0.5) shows the same purple at 50 percent opacity. The tool does not calculate transparency, so you add the fourth value yourself. If you type a number above 255 into the RGB field, the tool caps it at 255. It reads digits only, so a minus sign is ignored: type -20 and the tool reads 20.
What is HSL, and why is it useful?
On the hue wheel, 0 degrees is red, 120 degrees green, and 240 degrees blue; 60 degrees is yellow, 180 cyan, and 300 magenta. In the tool, TakipOX purple comes out as hsl(262, 83%, 58%): 262 degrees sits between blue and magenta, 83 percent saturation is vivid, and 58 percent lightness is a mid tone.
Designers use HSL to derive lighter and darker shades from a main color. hsl(262, 83%, 75%) is a lighter version of the same purple and hsl(262, 83%, 35%) a darker one. The tool shows HSL but does not take input in the HSL field; you can write the shade you derive straight into CSS as hsl(), which browsers support.
Which color format is used where?
| Where | Common format | Note |
|---|---|---|
| CSS, HTML | HEX, rgb(), hsl() | All three are valid; HEX is the shortest |
| Figma, Canva, Photoshop | HEX | Paste it straight into the color panel |
| Video editing | RGB or HEX | Depends on the app |
| CMYK | Does not match screen color exactly; ask your print shop | |
| Instagram, TikTok text color | HEX | In-app pickers rarely accept codes; match with the eyedropper |
For print jobs, a screen color code is not enough; CMYK conversion depends on the paper and the ink. On social media, image sizes and colors are planned together; for the dimensions, see the social media image sizes table.
How do you build a color palette?
First choose the main color that represents your brand or project and save its code. Then look at the HSL value in the tool; raise and lower the lightness by 15 percent to create two more shades. These three shades cover most designs: the dark shade for headings, the main shade for buttons, and the light shade for backgrounds.
For an accent, choose a highly saturated color with a hue opposite the main one; call-to-action buttons will stand out. Keep the palette to three main colors plus neutrals, since more starts to look scattered. Copy the HEX, RGB, and HSL values of every color from the bottom bar and keep them in one document, so CSS, design tools, and presentations all use the same values.
How do you check contrast and readability?
The brightness formula (0.299 R + 0.587 G + 0.114 B) accounts for the eye being more sensitive to green, which is why a green with the same numeric value looks lighter than a blue. Rose red #F43F5E looks vivid, but its brightness is 121, so white text reads better on it.
Accessibility guidelines use a separate measure called the contrast ratio; at least 4.5:1 is recommended for normal text. The tool does not calculate this ratio, and the Brightness card only gives a quick direction. In Story and post images, white text on yellow or light green is one of the most frequent mistakes, which is why tools like the meme generator add a black outline to the text.
How do you keep colors consistent on social media?
The in-app text color pickers on Instagram and TikTok generally do not let you type a code; you pick the color from an image on screen with the eyedropper. So keep a small square image in your brand color on your phone and pick the color from it with the eyedropper when you write a Story. For highlight covers, the Story highlight cover tool accepts a HEX code directly.
Consistent colors make you easier to recognize, but what decides reach is how people engage with your content in its first hours. Once the organic basics are in place, you can check the quality with the free Instagram followers trial and look at the packages in the "What's next?" box above.
Common mistakes with color codes
- ✕MistakeWriting a HEX code with five or seven digits.✓BetterUse exactly six digits (or the short three-digit form); the tool does not update on an invalid code.
- ✕MistakeMixing up the letter O and the digit 0, or the letter I and the digit 1.✓BetterHEX only uses 0-9 and A-F; the letters O and I never appear.
- ✕MistakeSending a screen color to the print shop as a HEX code.✓BetterPrint needs CMYK or Pantone; match the color with your printer.
- ✕MistakePutting white text on a light yellow background.✓BetterCheck the Brightness card; on a background of 128 or above, use dark text.
- ✕MistakePicking a new shade by eye for every post.✓BetterDocument a three-shade palette with HEX codes and use the same code in every template.
- ✕MistakeConverting back from HSL by hand and treating a one or two unit difference as an error.✓BetterHSL is rounded; for the exact value, rely on HEX or RGB.
Frequently asked questions
The questions people ask most about this tool.
How do I convert a HEX color code to RGB?
Type a code such as #FF5733 into the HEX field and the tool shows the RGB value, rgb(255, 87, 51), and the HSL value, hsl(11, 100%, 60%), as you type. It works the other way too: enter three RGB numbers and you get the HEX code. Everything runs in your browser, and you can copy the result straight into your design.
Is the color code converter free, and is there a usage limit?
The tool is free and has no usage limit. You can convert as many colors as you like, at any time of day. There is no payment, subscription, or credit system, and every conversion between HEX, RGB, and HSL is available without any extra fee.
What is the difference between the HEX, RGB, and HSL color formats?
HEX (#FF5733) is the short notation used most often on the web and in CSS. RGB gives the red, green, and blue channels as values from 0 to 255. HSL describes a color by hue, saturation, and lightness, which is more intuitive when you want to lighten or darken a color. You can enter HEX or RGB, and the tool calculates the other formats, including HSL.
Are the color codes I enter sent to a server?
No, color codes are not sent to a server. All conversions happen directly in your browser, on your own device, and nothing you type leaves it. Your work stays private, and you do not need to sign up or create an account to use the tool.
Do I need an account to use the color converter?
No, there is no membership or sign-up. You can start using the tool as soon as the page opens. No email address, phone number, or other details are requested. Type your color code, see the conversion, and copy the result, with no login step in between.
Does the color code converter work on phones and tablets?
Yes, the tool works in mobile browsers. On a phone, tablet, or computer you can convert between HEX, RGB, and HSL the same way and use the color picker. There is no app to download; opening the page in your browser is enough.
How do I find the HEX code of a color with the color picker?
Open the color picker and choose the shade you want from the palette; the tool shows that color's HEX, RGB, and HSL values right away. That way you can find a color by eye and copy its code. You can also fine-tune the shade inside the picker to make it darker or lighter and watch the codes update.
How do I use the converted color code in CSS?
Paste the code straight into your CSS, for example color: #FF5733; or background: rgb(255, 87, 51);. HEX and RGB are the most common in web design, and HSL is handy for adjusting shades. Use the Copy button next to each field to take the code and add it to your stylesheet.
Describe how the tool actually worked for you. Your rating is published after our team checks it.
Related tools
All toolsMake clean highlight covers from a color or gradient plus an emoji and download them without a watermark.
Social Media Image SizesCurrent image and video sizes for Instagram, TikTok, YouTube, X, and Facebook in one table.
Meme GeneratorAdd top and bottom text to an image to make a classic meme and download it as a PNG.
QR Code GeneratorTurn a link or text into a QR code and download it as a PNG.
Photo CombinerCombine two or more photos side by side, stacked, or in a grid and download a PNG or JPG.
Image Compressor and ResizerCompress an image to a target file size, resize it, and convert it to JPG, PNG, or WebP without the file leaving your device.


