labClamp
labClamp(
value):LabD50
Defined in: packages/math-color/src/spaces/lab-d50/clamp.ts:21
Clamps the channels of a LabD50 colour to their standard encoding ranges:
- L* to [0, 100]
- A* to [-128, 127]
- B* to [-128, 127]
These bounds match the integer encoding used in ICC profiles and sRGB-gamut Lab round-trips. Highly chromatic or out-of-gamut colours may legitimately exceed these ranges in intermediate computations; clamp only at output boundaries.
Parameters
Section titled “Parameters”The Lab colour to clamp.
Returns
Section titled “Returns”A new Lab colour with channels within their standard ranges.