How to Convert Colors
- Enter a HEX, RGB, or HSL color value
- Other formats update automatically
- Click preset colors for quick use
HEX, RGB, and HSL — What Each One Is
All three describe the same colours; they just express them differently, and each is convenient for a different job.
| Format | Looks like | Best for |
| HEX | #3B82F6 | CSS, design handoff, brand guidelines |
| RGB | rgb(59, 130, 246) | Code that calculates colour values, transparency via rgba() |
| HSL | hsl(217, 91%, 60%) | Building palettes — lighter and darker variants of one colour |
HEX
A hexadecimal code where each pair of characters is the red, green, and blue channel in turn: #3B82F6 is 3B red, 82 green, F6 blue. Each pair runs from 00 (none) to FF (full). Three-character shorthand like #F00 expands by doubling each character — it means #FF0000, pure red.
RGB
The same three channels expressed as decimal numbers from 0 to 255. It is easier to work with in code because you can add, multiply, and interpolate the values directly. The rgba() variant appends an alpha channel from 0 (fully transparent) to 1 (fully opaque).
HSL
A different model: hue as an angle on the colour wheel from 0 to 360, saturation as a percentage of intensity, and lightness as a percentage from black to white. HSL is the format designers reach for when building a palette, because you can hold hue and saturation constant and vary only lightness to generate a coherent set of tints and shades — something that requires guesswork in HEX.
Why Convert Between Them?
- Brand guidelines give you HEX, your code needs RGB. Any transparency in CSS requires
rgba(), so a HEX brand colour has to be converted before you can fade it.
- You need a lighter or darker variant. Convert to HSL, adjust the lightness percentage, and convert back — far more reliable than guessing at hex digits.
- Design tools disagree. Figma, Photoshop, and CSS each default to different notations, and moving a colour between them means converting.
A Note on Accessibility
Converting a colour never changes how readable it is. If you are choosing text colours, check the contrast ratio against the background: WCAG AA requires 4.5:1 for normal body text and 3:1 for large text. Light grey text on white is a common failure — it converts perfectly between formats while remaining unreadable for many users.
Color Converter instantly translates colors between HEX, RGB, and HSL formats. Essential for web designers, graphic designers, and developers who work across different color systems. Convert your brand colors, pick from preset swatches, or explore new color combinations with our interactive tool.
Tips for Best Results
- HEX is most common for web development (CSS), RGB for design software, HSL for intuitive adjustments
- Use the color swatches for quick access to common design colors
- The color preview updates in real-time as you type
- HSL is great for creating color schemes — adjust hue, saturation, and lightness independently
Frequently Asked Questions
Are HEX and RGB the same colour?
Yes. They are two notations for identical values — #3B82F6 and rgb(59, 130, 246) render exactly the same pixel. Converting between them is lossless in both directions.
How do I make a colour lighter or darker?
Convert it to HSL and change only the lightness percentage. Raising lightness produces a tint, lowering it produces a shade, and because hue and saturation are untouched the result stays recognisably the same colour.
What does the alpha value in RGBA mean?
Alpha controls opacity, from 0 (completely transparent) to 1 (completely opaque). So rgba(59, 130, 246, 0.5) is the same blue at 50% opacity, letting whatever sits behind it show through.
Can I use these colours for printing?
Not directly. HEX, RGB, and HSL are all screen colour models, while commercial printing uses CMYK, which covers a narrower range of colours. Vivid screen colours often print duller — convert to CMYK in a print-focused tool if exact colour matching matters.