Color Studio
Pick a colour on a live wheel and get harmonies, a full tint scale and WCAG contrast instantly.
How Color Studio calculator works?
The Color Studio calculator works in 5 steps: it reads a HEX code, converts the code to RGB and HSL, rotates the hue to build a harmony palette, steps the lightness to build 11 shades and measures WCAG contrast.
- 1
Read the color
A color enters as a 6-digit HEX code, a pick from the color picker or a drag on the wheel. The wheel angle sets hue (0–360°) and the distance from the center sets saturation (0–100%).
- 2
Convert HEX to RGB and HSL
Each pair of HEX digits converts from base 16 to a 0–255 channel value. The red, green and blue (RGB) values then convert to hue, saturation and lightness (HSL).
- 3
Build the harmony palette
Harmony rules add fixed angles to the hue: +180° for complementary, +120° and +240° for triadic, ±20° and ±40° for analogous, +150° and +210° for split complementary.
- 4
Build 11 tints and shades
The scale keeps hue and saturation and sets lightness to 11 steps, from 96% (step 50) to 12% (step 950).
- 5
Check contrast
The relative luminance of the color is compared with white (#FFFFFF) and near-black (#0B0D12) text. The 2 contrast ratios get AA and AAA results from the Web Content Accessibility Guidelines (WCAG) 2.1.
Color Studio formula
Color Studio uses 4 formulas: HEX to RGB, RGB to HSL, relative luminance and contrast ratio. The worked examples use pink #EC4899.
HEX to RGB
- RR, GG, BB
- The 3 two-digit base-16 pairs of a HEX code
- A–F
- Digits worth 10–15
RGB to HSL
- max, min
- Largest and smallest channel ÷ 255
- H
- 60° × the position of the largest channel on the color circle
Relative luminance
- R, G, B
- Linear channels: c ÷ 12.92 when c ≤ 0.03928, else ((c + 0.055) ÷ 1.055)^2.4
- L
- 0 for black, 1 for white
Contrast ratio
- L₁
- Luminance of the lighter color
- L₂
- Luminance of the darker color
Color Studio conversion chart
The Color Studio conversion chart converts 16 common colors between HEX, RGB and HSL, with contrast ratios against white and black text and the better text color for each.
| Color | HEX | RGB | HSL | vs white | vs black | Text |
|---|---|---|---|---|---|---|
| AaRed | #FF0000 | rgb(255, 0, 0) | hsl(0, 100%, 50%) | 4.00 AA Large | 5.25 AA | Black |
| AaOrange | #FFA500 | rgb(255, 165, 0) | hsl(39, 100%, 50%) | 1.97 Fail | 10.63 AAA | Black |
| AaGold | #FFD700 | rgb(255, 215, 0) | hsl(51, 100%, 50%) | 1.40 Fail | 14.97 AAA | Black |
| AaYellow | #FFFF00 | rgb(255, 255, 0) | hsl(60, 100%, 50%) | 1.07 Fail | 19.56 AAA | Black |
| AaLime | #00FF00 | rgb(0, 255, 0) | hsl(120, 100%, 50%) | 1.37 Fail | 15.30 AAA | Black |
| AaGreen | #008000 | rgb(0, 128, 0) | hsl(120, 100%, 25%) | 5.14 AA | 4.09 AA Large | White |
| AaTeal | #008080 | rgb(0, 128, 128) | hsl(180, 100%, 25%) | 4.77 AA | 4.40 AA Large | White |
| AaCyan | #00FFFF | rgb(0, 255, 255) | hsl(180, 100%, 50%) | 1.25 Fail | 16.75 AAA | Black |
| AaBlue | #0000FF | rgb(0, 0, 255) | hsl(240, 100%, 50%) | 8.59 AAA | 2.44 Fail | White |
| AaNavy | #000080 | rgb(0, 0, 128) | hsl(240, 100%, 25%) | 16.01 AAA | 1.31 Fail | White |
| AaPurple | #800080 | rgb(128, 0, 128) | hsl(300, 100%, 25%) | 9.42 AAA | 2.23 Fail | White |
| AaMagenta | #FF00FF | rgb(255, 0, 255) | hsl(300, 100%, 50%) | 3.14 AA Large | 6.70 AA | Black |
| AaPink | #FFC0CB | rgb(255, 192, 203) | hsl(350, 100%, 88%) | 1.54 Fail | 13.65 AAA | Black |
| AaBrown | #A52A2A | rgb(165, 42, 42) | hsl(0, 59%, 41%) | 7.08 AAA | 2.96 Fail | White |
| AaGray | #808080 | rgb(128, 128, 128) | hsl(0, 0%, 50%) | 3.95 AA Large | 5.32 AA | Black |
| AaBlack | #000000 | rgb(0, 0, 0) | hsl(0, 0%, 0%) | 21.00 AAA | 1.00 Fail | White |
Color Studio FAQ
What is the difference between HEX, RGB and HSL?
What contrast ratio does WCAG require?
How do I find a complementary color?
Is white or black text better on my color?
What do the 50 to 950 shade numbers mean?
Can I copy Color Studio colors into CSS?
--brand: #ec4899;. Palette swatches copy as HEX codes.