Close Menu
JustwebworldJustwebworld
  • People
  • Sports
  • Culture
  • Lifestyle
  • Food
  • Travel
  • Health
  • Tech
  • Business
  • Money
  • Digital
  • Gaming
  • Auto
  • Fashion
  • Home
  • Mind
  • Learn
Facebook X (Twitter) Instagram Pinterest YouTube LinkedIn WhatsApp Telegram
Monday, September 14
  • About
  • Contact
  • Advertise
  • Disclaimer
  • Privacy Policy
  • Editorial Policy
  • Tools
  • Games
JustwebworldJustwebworld
  • People
  • Sports
  • Culture
  • Lifestyle
  • Food
  • Travel
  • Health
  • Tech
  • Business
  • Money
  • Digital
  • Gaming
  • Auto
  • Fashion
  • Home
  • Mind
  • Learn
JustwebworldJustwebworld
Home » Tools » Design & Color » OKLab Color Converter

OKLab Color Converter

Michael Austin Updated:August 24, 2026

Convert any color to and from OKLab — the rectangular form of OKLCH, with L for lightness and a/b axes instead of chroma and hue. OKLab is what CSS interpolates gradients and color-mix() in by default, so these are the numbers your browser actually animates through.

The rectangular workhorse

OKLab is OKLCH with the polar coordinates unwrapped: instead of chroma-and-hue, two signed axes — a (green↔red) and b (blue↔yellow) around the same perceptual L. Machines prefer it this way: interpolation, averaging and distance are linear operations, and OKLab is where CSS runs them — gradients and color-mix() default to this space.

Reading and writing oklab() values

White is oklab(1 0 0), black oklab(0 0 0), and the gray ramp runs between with both axes at zero. sRGB colors keep |a| and |b| under ~0.4. A quick worked read: oklab(0.63 −0.05 −0.14) — mid lightness, slightly green-of-neutral, strongly blue → an azure. The converter does the precise version of that read in both directions.

polar ↔ rectangular
C = √(a² + b²)          a = C·cos(H)
H = atan2(b, a)         b = C·sin(H)

When to pick which coordinates

Editing by hand: OKLCH (rotate hue, dial chroma — intuitive). Computing: OKLab (lerp two colors, average a palette, measure distance — the math behaves). They are the same space; conversion is trigonometry, not color change. This page accepts any notation and emits the rectangular form alongside all others.

OKLab and CIELAB in one sentence each

CIELAB: the 1976 measurement standard, D50-referenced, with known hue bends in blue. OKLab: the 2020 redesign tuned on modern datasets, hue-linear enough for gradients, adopted wholesale by CSS. Interchange with instruments in Lab; generate and interpolate in OKLab.

Reference values, computed live

Rectangular coordinates become legible beside known colors. Seven named colors in OKLab form with their hex equivalents:

ColorOKLabHEX
goldoklab(0.887 -0.017 0.181)#ffd700
tealoklab(0.543 -0.09 -0.024)#008080
slateblueoklab(0.544 0.046 -0.165)#6a5acd
siennaoklab(0.526 0.082 0.081)#a0522d
yellowgreenoklab(0.785 -0.11 0.147)#9acd32
dodgerblueoklab(0.652 -0.055 -0.182)#1e90ff
firebrickoklab(0.497 0.16 0.081)#b22222

Check the signs against the color wheel in your head: a positive means red-of-neutral, negative green-of-neutral; b positive yellow-side, negative blue-side. The magnitudes stay small — sRGB never pushes |a| or |b| far past 0.3 — which is why a value like 0.8 in either axis is an immediate red flag for out-of-gamut input.

How to use the OKLab Color Converter

  1. Enter any color – hex, rgb(), a name, or an oklab() value to decode.
  2. The result updates live as you type – no convert button needed.
  3. Copy the oklab() form, or the full format list.
  4. Copy the value with the copy button, or switch the output format dropdown for other export shapes.

Frequently asked questions

What is OKLab and how does it relate to OKLCH?

The same color space in two coordinate systems: OKLab is rectangular (L, a, b axes), OKLCH its polar reading (L, chroma, hue). Convert between them with C = √(a²+b²), H = atan2(b,a) – no color changes, only the description.

Why does CSS default to OKLab for gradients and color-mix()?

Because straight lines through OKLab look right: no gray dead zone mid-gradient, no lightness dip. When you write color-mix(in oklab, …) or a default CSS gradient interpolation in newer specs, these are the numbers being averaged.

What do the a and b axes mean in OKLab?

Same intuition as Lab but rescaled: a runs green→red, b runs blue→yellow, both roughly ±0.4 at sRGB extremes (versus ±128-ish in Lab). Zero on both axes is the neutral gray ramp.

When do I want rectangular OKLab over polar OKLCH?

For math: interpolation, averaging several colors, distance measures – linear operations behave in rectangular coordinates. For humans editing a color, polar OKLCH (twist hue, dial chroma) is friendlier. Same space, pick the coordinates per task.

How accurate is this implementation?

It uses the reference matrices from Björn Ottosson's definition, matches the CSS Color 4 spec example for red to four decimals, and round-trips a color grid exactly in automated tests.

Is OKLab a replacement for CIELAB everywhere?

For design-tool math, effectively yes. For instrument interchange, tolerance contracts and print standards, Lab remains the lingua franca – decades of QC infrastructure speak it. Know both; convert freely.

What is a quick sanity check for oklab() values?

Neutral grays must have a ≈ 0 and b ≈ 0; white is oklab(1 0 0), black oklab(0 0 0). If a "gray" shows a=0.05, something upstream tinted it.

Related LAB and OKLCH tools

More in Design & Color.

  • RGB to OKLCH Converter — Convert RGB colors to OKLCH — the modern perceptual space behind new CSS color work, where equal lightness numbers actually look equally light.
  • Color Mixer and Blender — Mix two colors in any ratio and get the exact result.
  • OKLCH to HEX Converter — Convert oklch() colors to plain hex for older tooling and fallbacks.
  • Complete Color Converter — Convert a color between every common format in one place.
  • LCH Color Converter — Convert colors to and from CIELCH — CIELAB expressed as lightness, chroma and hue, the polar form that makes Lab intuitive to edit.
  • OKLCH to RGB Converter — Convert oklch() values to RGB channels.

cards
Powered by paypal
Follow on WhatsApp Follow on Telegram
Share. Facebook Twitter Pinterest LinkedIn Tumblr Telegram WhatsApp Copy Link
Previous ArticleOKLCH to RGB Converter
Next Article LCH Color Converter
Michael Austin
  • Website
  • Facebook
  • X (Twitter)
  • Pinterest
  • Instagram
  • LinkedIn

Michael Austin is the current owner of Justwebworld and manages the platform’s editorial direction, content strategy, and digital publishing operations. With a strong interest in online media and modern publishing, he focuses on creating informative, engaging, and easy-to-understand content across multiple categories.Under his leadership, Justwebworld continues to grow as a trusted multi-niche digital publication covering technology, business, lifestyle, automotive, sports, travel, and trending internet topics for readers worldwide.

Related Posts

Store Credit Card Logins: Issuers, Portals & Phone Numbers

CT Scan Procedure Explained: Step-by-Step Guide for Patients

Refreshing Summer Sips and Fruit Beverages to Serve Your Guests

IRS and Colorado Tax Debt: The Relief Programs Denver Taxpayers Should Know

Where Should NRIs Keep Money for Everyday Expenses in India?

The Role of Data Analytics in Health Insurance Pricing

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 41.9K other subscribers
Categories
Latest Posts

Store Credit Card Logins: Issuers, Portals & Phone Numbers

CT Scan Procedure Explained: Step-by-Step Guide for Patients

Refreshing Summer Sips and Fruit Beverages to Serve Your Guests

IRS and Colorado Tax Debt: The Relief Programs Denver Taxpayers Should Know

Where Should NRIs Keep Money for Everyday Expenses in India?

The Role of Data Analytics in Health Insurance Pricing

Filing a Personal Injury Claim in Durham

Looking for Easy Banking After Retirement? Consider a Digital Savings Account

Can I Get ₹1.5 Crore Term Insurance on a ₹10 Lakh Salary?

How to Switch Your Car Insurance Company Without Losing Your Benefits?

The content on this website is provided solely for educational and informational purposes. We do not promote, endorse, or deal in any products, services, or activities mentioned. While we strive to share accurate and up-to-date information, we make no warranties regarding completeness, reliability, or accuracy. Any action you take based on the information found here is strictly at your own risk, and we will not be liable for any losses or damages in connection with the use of our website.

DMCA.com Protection Status
Justwebworld

Explore knowledge, feed curiosity — trusted by readers since 2012.

Explore Topics
TechBusinessDigitalMoneyLearnPeopleLifestyleCultureHealthHomeTravelGamingFashionAutoFoodMindLawSportsShoppingAI
Popular Tools
Age CalculatorWord CounterCase ConverterLove CalculatorReading TimePeriod CalculatorNumber to WordsAngel NumberHarry Potter NameDemon NameKingdom NameAll Tools →
Popular Games
Bubble BlastSudokuTruth or Dare WheelYes / No WheelAll Games →
Facebook X (Twitter) Instagram Pinterest YouTube Tumblr LinkedIn WhatsApp Telegram Threads RSS
  • About
  • Contact
  • Advertise With Us
  • Disclaimer
  • Privacy Policy
  • Terms & Conditions
  • Editorial Policy
  • Write for Us
Copyright © 2012-2026. Justwebworld - All Rights Reserved. | Sitemap

Type above and press Enter to search. Press Esc to cancel.