lab
Description
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 ±160 in practice.
Channel | Low Unit | High Unit | Low Number | High Number |
---|---|---|---|---|
l | 0.0% | 100.0% | 0.0 | 100.0 |
a | -100.0% | 100.0% | -125.0 | 125.0 |
b | -100.0% | 100.0% | -125.0 | 125.0 |
a | 0.0% | 100.0% | 0.0 | 1.0 |
Syntax
CSS
lab()
Values
<lab()> = lab( [ <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
Links
Related
Functions
- abs
- acos
- asin
- atan
- atan2
- attr
- calc
- clamp
- color
- conic-gradient
- cos
- counter
- counters
- hsl
- hsla
- hwb
- lch
- linear-gradient
- matrix
- matrix3d
- max
- min
- mod
- oklab
- oklch
- param
- perspective
- radial-gradient
- rem
- repeating-conic-gradient
- repeating-linear-gradient
- repeating-radial-gradient
- rgb
- rgba
- rotate
- rotate3d
- rotateX
- rotateY
- rotateZ
- round
- scale
- scale3d
- scaleX
- scaleY
- scaleZ
- sin
- skew
- skewX
- skewY
- src
- tan
- translate
- translate3d
- translateX
- translateY
- translateZ
- url
- var