Color Converter & Picker
Pick a colour or paste any HEX, RGB or HSL value to convert it instantly, then check that your text and background pass WCAG contrast. Everything runs in your browser.
- Free
- No sign-up
- Runs in your browser
Paste HEX, RGB, HSL or a CSS colour name.
Conversions
- HEX
#2e6a4c - RGB
rgb(46, 106, 76) - HSL
hsl(150, 39%, 30%) - HSV / HSB
hsv(150, 57%, 42%) - OKLCH
oklch(47.5% 0.08 159.3) - CMYK
cmyk(57%, 0%, 28%, 58%) - CSS rgb()
rgb(46 106 76)
Tints and shades
Contrast checker
WCAG 2.2Large text, 24px bold
Normal text at 16px. The quick brown fox jumps over the lazy dog.
6.39:1
Good contrast
- AA normal text (4.5:1)✓ Pass
- AA large text (3:1)✓ Pass
- AAA normal text (7:1)✗ Fail
- AAA large text (4.5:1)✓ Pass
- UI parts & icons (3:1)✓ Pass
Conversions and contrast checks run on your device. Nothing you type or pick is sent anywhere.
What it is for
Screens describe colour in several ways: HEX codes in CSS and design tools, RGB values in code, and HSL when you want to adjust lightness. This tool converts between all of them, and its contrast checker tells you whether text in one colour is readable on another.
- Turn a HEX code from a design file into rgb() or hsl() for your CSS.
- Check that button text, links and body copy pass WCAG accessibility rules.
- Find lighter and darker versions of a brand colour for hover states and backgrounds.
- Grab the exact colour of something on screen and get its code.
How to use it
- Type or paste a colour into the box, use the colour picker, or press Pick from screen.
- Copy the format you need from the list of conversions.
- In the contrast checker, set a text colour and a background colour and read the ratio and pass or fail results.
- If the pair fails, press Use suggestion, or adjust the colours until every check you need passes.
Examples
HEX to RGB and HSL
You enter
#2e6a4cYou get
rgb(46, 106, 76)
hsl(150, 39%, 30%)
oklch(47.5% 0.08 159.3)Gray text on white
You enter
Text #777777 on background #ffffffYou get
4.47:1, fails AA for normal textOne step darker, #767676 reaches 4.54:1 and passes. It is the lightest gray that does.
A see-through colour
You enter
rgb(46 106 76 / 50%)You get
#2e6a4c80
rgba(46, 106, 76, 0.5)The last two HEX digits store the opacity: 80 in hex is 128 out of 255, about 50%.
Good to know
- Paste a colour in any common format, including 3 or 8 digit HEX, rgb(), hsl() and even CSS names such as rebeccapurple. It is recognised automatically.
- In Chrome and Edge, Pick from screen lets you grab a colour from anywhere on your display.
- If a pair fails the contrast check, Use suggestion finds the nearest shade of your text colour that passes AA.
- Click any tint or shade to load it, which is a quick way to build a palette from one brand colour.
Limits and disclaimers
- HSL values are rounded to whole numbers, so converting HSL to HEX and back can move a channel by one. Copy the HEX if you need an exact match.
- CMYK values are a simple mathematical conversion. Real print colours depend on the printer, ink and paper profile, so use your print shop's colour profile for final artwork.
- The contrast checker follows WCAG 2.2. A see-through text colour is blended with its background before the ratio is measured.
- Pick from screen relies on the EyeDropper API, which is currently available in Chrome, Edge and Opera on desktop only.
ByteKit is provided as is, for convenience. Check any result that matters before you use it in production, and keep passwords, keys and personal data out of any website you do not control.
Colour formats at a glance
All of these describe the same colour, ByteKit green. Each one is easiest to use in a different place.
| Format | Example | Used in | Good to know |
|---|---|---|---|
| HEX | #2e6a4c | CSS, Figma, design handoff | Add two digits for opacity: #2e6a4c80 |
| RGB | rgb(46, 106, 76) | CSS, code, canvas and image APIs | Red, green and blue from 0 to 255 |
| HSL | hsl(150, 39%, 30%) | CSS themes, hover and focus states | Change only the lightness for shades |
| HSV / HSB | hsv(150, 57%, 42%) | Photoshop and most colour pickers | Not supported in CSS |
| OKLCH | oklch(47.5% 0.08 159.3) | Modern CSS and design systems | Lightness matches what the eye sees |
| CMYK | cmyk(57%, 0%, 28%, 58%) | A rough guide, not a print profile |
- Contrast ratios run from 1:1 (the same colour twice) to 21:1 (black on white). Body text should reach at least 4.5:1.
- Large text means at least 24px, or at least 18.66px (14pt) when bold. It only needs 3:1.
- Do not rely on colour alone to show meaning, such as red for errors. Add an icon or a word too, for people who see colour differently.
Related tools
Questions people ask
How do I convert HEX to RGB?
Split the six digits into three pairs and read each pair as a hexadecimal number from 0 to 255. For #2e6a4c, 2e is 46, 6a is 106 and 4c is 76, so the colour is rgb(46, 106, 76). Paste a HEX code above to do it instantly.
What contrast ratio do I need?
WCAG level AA asks for at least 4.5:1 for normal text and 3:1 for large text (about 24px, or 19px bold) and for icons and form borders. Level AAA asks for 7:1 for normal text and 4.5:1 for large text.
What is the difference between HSL and HSV?
Both describe a hue plus how colourful and how bright it is. In HSL, 100% lightness is always white. In HSV (also called HSB, used by Photoshop), 100% value is the brightest version of the colour. CSS supports HSL, not HSV.
What is OKLCH?
A newer colour space supported by modern CSS. Its lightness matches how bright colours look to people, so palettes built in OKLCH stay even across different hues.
Is anything sent to a server?
No. All conversions and contrast checks happen in your browser. Nothing you type or pick is uploaded.