Oklab color space: Difference between revisions

Content deleted Content added
Added pictures
Line 1:
{{short description|Standard color space with color-opponent values}}
[[File:Colour gradient comparison of HSV and okLCH.png|thumb|right|Irregular perceptual lightness in a gradient generated with constant ''value'' in [[HSL and HSV|HSV]] space, with light yellows and dark blues, compared to one generated with constant lightness in Oklch.]]
 
The '''Oklab color space''' is a [[Color appearance model|uniform color space]] for [[Color management|device independent color]] designed to improve [[perceptual uniformity]], [[hue]] and [[lightness]] prediction, [[Color gradient|color blending]], and [[usability]] while ensuring [[numerical stability]] and [[Programming complexity|ease of implementation]].<ref name="ottoson-intro">{{cite web |last1=Ottosson |first1=Björn |title=A perceptual color space for image processing |url=https://bottosson.github.io/posts/oklab/ |website=GitHub Pages |access-date=24 July 2024 |date=23 Dec 2020}}</ref> Introduced by Björn Ottosson in 2020, Oklab and its [[Cylindrical coordinate system|cylindrical]] counterpart, Oklch, have been included in the [[CSS colors|CSS Color]] Level 4 draft for device-independent [[web colors]].<ref name="w3c">{{cite tech report |title=CSS Color Module Level 4 |url=https://www.w3.org/TR/css-color-4/ |institution=W3C |type=Candidate recommendation draft |access-date=24 July 2024}}</ref> They are supported by recent versions of major [[web browser]]s,<ref>{{cite web |title=Oklab color model |url=https://caniuse.com/mdn-css_types_color_oklab |website=Can I Use |access-date=24 July 2024}}</ref> allowing the specification of [[Wide-gamut RGB color space|wide-gamut]] [[DCI-P3|P3]] colors.<ref name="evilmartians">{{cite web |last1=Sitnik |first1=Andrey |last2=Turner |first2=Travis |title=OKLCH in CSS: why we moved from RGB and HSL |url=https://evilmartians.com/chronicles/oklch-in-css-why-quit-rgb-hsl |website=Evil Martians |access-date=24 July 2024 |date=25 January 2023}}</ref>
Line 6 ⟶ 7:
 
==Coordinates==
[[File:Oklch colourwheel (L=0.7, C=0.2).png|thumb|right|Oklch color wheel]]
Oklab uses the same spatial structure as CIELAB, representing color using three components:
* ''L'' for perceptual lightness, ranging from 0 (pure black) to 1 (reference white, if achromatic), often denoted as a [[percentage]]