Type a color code to see its equivalent in the other formats at once. It runs in your browser and nothing is sent to a server.
Type HEX (#3b82f6), rgb(), hsl() or a color name (blue). Click any swatch below to select that color.
Choose an image or drag and drop it here, or paste it with Ctrl+V.
Click or tap the image to select the color at that point. With the keyboard, move the pointer with the arrow keys and press Enter. The image stays in your browser and is never uploaded.
Large text Aa
Normal-size sample text. See here whether the contrast is enough.
| Criterion | Required | Result |
|---|
The semi-transparent color was blended over the background for the calculation.
A HEX code is six hexadecimal digits after the # sign, split into three pairs: the first pair is the amount of red, the second green and the third blue. Hexadecimal digits are 0–9 and a–f, and each pair ranges from 00 (none) to ff (255, full). So #ff0000 is pure red, #ffffff is white and #000000 is black. #3b82f6 is 3b = 59 red, 82 = 130 green and f6 = 246 blue, or rgb(59, 130, 246).
HEX: the most common format in CSS, HTML, Figma, Canva and most design tools. RGB: some programs, the "More colors" dialog in Office apps and color calculations in JavaScript. HSL: the most practical format for making lighter and darker shades and for defining color variables in CSS.
For semi-transparent colors use rgba(), hsla() or 8-digit HEX (such as #3b82f680, where the last two digits are the opacity). Three-digit short HEX doubles each digit: #38f is the same as #3388ff.
Conversion between HEX and RGB is exact, with no loss. HSL values are shown rounded to whole numbers, so converting from HSL back to RGB can be off by one unit, which is invisible to the eye. CMYK, used in print, is a different system from screen colors; giving the printer your HEX code and asking for a test print is the safest route. Calculations run in your browser.
The six digits of the HEX code are split into three pairs: the first two are red, the next two green and the last two blue. Each pair is converted from hexadecimal to decimal. For #3b82f6, 3b = 59, 82 = 130 and f6 = 246, so rgb(59, 130, 246).
Each digit is doubled: #38f is the same as #3388ff. Only colors whose pairs are identical can be written in the short form.
HSL values are shown rounded to whole numbers, so converting from HSL back to RGB can differ by one unit. The conversion between HEX and RGB is exact.
No. The calculation runs in your browser and nothing is uploaded.