ColorToolkits
Format Converter

RGB to OKLCH Converter

Convert sRGB values to perceptual OKLCH lightness, chroma, and hue angle for modern CSS tokens.

Converted (OKLCH)
oklch(0.645 0.215 16.4)
#F43F5E
Try presets:

How to Use This Tool

  1. Enter or paste your RGB value or choose one of the curated preset swatches.
  2. Copy the formatted OKLCH value directly, or inspect the secondary HEX, RGB, HSL, and OKLCH chips below.
  3. Click into Tailwind Scale Generator or Contrast Checker to validate accessibility on the converted shade.

Key Features

  • Bidirectional parsing supporting CSS Color Level 4 syntax cleanly
  • Gamma-compressed sRGB linearizes via the piecewise sRGB power curve before transforming through XYZ-D65 / LMS matrices into OKLab polar OKLCH.
  • Instant clipboard feedback with live OKLCH and Display-P3 gamut safety
  • Zero server round-trips—every calculation executes immediately in browser memory

sRGB transfer decoding to OKLCH

Gamma-compressed sRGB linearizes via the piecewise sRGB power curve before transforming through XYZ-D65 / LMS matrices into OKLab polar OKLCH.

Reference Snippet (CSS)

background-color: oklch(0.645 0.246 16.4);

Frequently Asked Questions

More Color Tools

View all tools →