Skip to content
yutils
Example

Input

#5b21b6

Output (every format)

HEX:  #5b21b6
RGB:  rgb(91, 33, 182)
HSL:  hsl(266, 70%, 42%)
OKLCH: oklch(0.45 0.20 290)

Note

Auto-detects HEX, RGB, HSL inputs. Includes a color picker, the EyeDropper API, and a curated palette.

Usage / FAQ

When to use

  • Convert HEX to RGB / HSL for CSS (rgba when alpha is needed)
  • Transfer colors between Figma and code
  • Quickly convert a designer's HSL into HEX
  • Document a brand color in every notation at once
  • Use the EyeDropper to grab any pixel color on screen

FAQ

Q.Are 3-digit HEX shortcuts supported?
A.Yes — `#f60` expands to `#ff6600`. CSS 4's 8-digit hex (#rrggbbaa with alpha) is also recognized.
Q.What if HSL's H exceeds 360?
A.H is mod 360 — 380 = 20, -10 = 350. CSS accepts that too, but the tool normalizes to 0-359 in the output.
Q.What is OKLCH?
A.A color space added to CSS Color 4 in 2023. Designed so equal L values look equally bright to humans — increasingly standard in design systems.
Fun facts
  • sRGB was created in 1996 by HP and Microsoft to standardize CRT monitor output (IEC 61966-2-1). It's still the default color space for nearly every web image and HTML color value — even with wide-gamut spaces like Display-P3 around, sRGB lives on as the fallback.

    Wikipedia — sRGB
  • Display-P3 is Apple's display standard, combining cinema's DCI-P3 color space with sRGB's gamma curve. Adopted starting with iPhone 7 (2016), it's why photos and emoji look more vivid — about 25% wider gamut than sRGB, especially in reds and greens.

    WebKit — Display P3
  • Gamma 2.2 appears across color spaces because of how human eyes work — we're sensitive to dark tones and less to bright ones. A nonlinear transfer function (brightness^2.2) distributes 8-bit integers perceptually evenly. Store images in linear RGB (gamma 1.0) and dark regions band horribly.

    Wikipedia — Gamma correction