14 categories See all →

Color Picker & Converter

Pick a color and get HEX, RGB, HSL, and CSS values instantly

Preview
#
CSS Value
Contrast on White—
Contrast on Black—
Luminance—
Advertisement

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

  1. Enter a colour value in any format: HEX (#1a56db), RGB (26, 86, 219), or HSL (225, 79%, 48%)
  2. The picker updates all formats simultaneously as you type or use the colour wheel
  3. Click on any colour value to copy it to clipboard
  4. Use the palette generator below the picker to create complementary, analogous, or triadic colour schemes
  5. 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

  1. 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.
  2. 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.
  3. 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.
  4. 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?

Runs Entirely in Your Browser
All color math for HEX, RGB and HSL conversion happens in JavaScript — nothing is sent to a server
HEX, RGB & HSL in Sync
Edit any format and the others update instantly, alongside a live CSS value and color preview
WCAG Contrast Ratios
See contrast ratio against white and black backgrounds plus relative luminance
Shade Palette Generator
Generates 9 lightness variations of your color for building UI palettes

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

HEX (#FF5733) is a 6-digit hexadecimal code used in CSS and design tools. RGB (255, 87, 51) uses red, green, blue values 0–255. HSL (14°, 100%, 60%) uses hue, saturation, lightness — more intuitive for designers.

CMYK (Cyan, Magenta, Yellow, Key/Black) is a color model used in print. It is subtractive — mixing creates darker colors. RGB is used for screens (additive). Always convert to CMYK before sending to a printer.

RGBA adds an alpha channel to RGB. Alpha ranges 0 (fully transparent) to 1 (fully opaque). Example: rgba(255, 0, 0, 0.5) is a 50% transparent red. In HEX, #FF000080 adds the alpha as the last 2 digits.

Web-safe colors are a set of 216 colors guaranteed to display consistently across different monitors and browsers from the 1990s era. With modern monitors, any RGB color is now displayable and web-safe colors are no longer a concern.

Was this tool helpful?