What is Color Picker?
Free color picker and converter. Convert between HEX, RGB, HSL, and RGBA color formats. Pick colors visually and get all color codes instantly. Developer utilities built for web developers, software engineers, and programmers. TekPulse's Color Picker is completely free — no signup, no ads in results, and no data stored on our servers.
How to Use Color Picker Online
- Enter a colour value in any format: HEX (#1a56db), RGB (26, 86, 219), or HSL (225, 79%, 48%)
- The picker updates all formats simultaneously as you type or use the colour wheel
- Click on any colour value to copy it to clipboard
- Use the palette generator below the picker to create complementary, analogous, or triadic colour schemes
- The colour name (e.g. "Royal Blue") is displayed if the colour matches a known named colour
Color Picker Formula & Calculation
HEX ↔ RGB: direct byte mapping | RGB → HSL: H from hue angle of max/min channels, S from chroma, L = (max+min)/2 | Contrast = (L1+0.05)/(L2+0.05)
HEX is just RGB written as 3 hex-byte pairs (#RRGGBB). Converting RGB to HSL first normalizes each channel to 0–1, finds the max and min channel (the "chroma" range), and computes Lightness as the midpoint of max and min. Saturation scales the chroma by how far L is from the extremes, and Hue is derived from which channel (R, G, or B) is currently the maximum.
Example: RGB(26, 86, 219) → normalized (0.102, 0.337, 0.859) → L = (0.859+0.102)/2 = 0.48 → H computed from the blue-max branch → HSL ≈ hsl(221°, 71%, 48%), matching hex #1a56db.
This tool also computes WCAG contrast ratio using relative luminance: each channel is gamma-corrected (sRGB → linear) before being weighted 0.2126R + 0.7152G + 0.0722B — green contributes far more to perceived brightness than red or blue, which is why a bright green can look lighter than an equally-bright blue.
Key Factors That Affect Your Result
- Gamma correction in luminance — Relative luminance isn't a simple average of R, G, B. Each channel is first linearized (values ≤ 0.03928 divide by 12.92, others use a power curve) because sRGB stores colors non-linearly — skipping this step gives wrong contrast numbers.
- WCAG contrast thresholds — 4.5:1 minimum for normal text (AA), 3:1 for large text (18pt+/14pt bold), 7:1 for AAA-level normal text. This tool's contrast ratio formula follows the W3C spec exactly, so results match what accessibility auditors check.
- HSL shade generation — Locking Hue and Saturation while sweeping Lightness from 10–90% generates a consistent tint/shade ramp for a color — this is how design systems build 50–900 color scales from one base color.
- Rounding differences — Converting RGB → HSL → RGB can shift values by ±1 due to rounding at each step; this is normal and not a bug.
Why Use TekPulse Color Picker?
Share & Embed
Help others discover this free tool. Share it or embed it on your website.
Free to embed with attribution link to tekpulse.in
Frequently Asked Questions
Was this tool helpful?
