HomeMenu
Jesus · Bible · HTML · CSS · JS · PHP · SVG · Applications

oklab

Description

The oklab function for CSS specifies OK lightness and hue (a axis and b axis).

a axis positive values are red and negative values are green. b axis positive values are yellow and negative values are blue. These values are unbounded but should not exceed ±0.5 in practice.

ChannelLow UnitHigh UnitLow NumberHigh Number
l0.0%100.0%0.01.0
a-100.0%100.0%-0.40.4
b-100.0%100.0%-0.40.4
a0.0%100.0%0.01.0

Syntax

CSS

oklab()

Values

<oklab()> =
    oklab(
        [ <percentage> | <number> | none ]
        [ <percentage> | <number> | none ]
        [ <percentage> | <number> | none ]
        [ / [ <alpha-value> | none ] ]?
    )
<percentage>

Specifies the percentage using a number followed by a percent sign (%).

<number>

An integer or zero or more decimal digits followed by a dot (.) followed by one or more decimal digits. The first character may be preceded by a sign (- or +). The last character may be succeeded by an exponent (e or E) and an integer.

none

Specifies a missing component.

<alpha-value> =
    <number> |
    <percentage>
<number>

An integer or zero or more decimal digits followed by a dot (.) followed by one or more decimal digits. The first character may be preceded by a sign (- or +). The last character may be succeeded by an exponent (e or E) and an integer.

<percentage>

Specifies the percentage using a number followed by a percent sign (%).

Examples

1 · lab · unit

2 · laba · unit

3 · lab · number

4 · laba · number

5 · JS