Type module
Sources
Items from OKLCH can be imported/included and used via following ways.
/** * -------------------------------------------------------- * Import via: OKLCH.ts * Access items like: $oklch.myVariable * $oklch.myFunction() * -------------------------------------------------------- */ import * as $oklch from "@amcharts/amcharts5/OKLCH";
Variables
OKLCH does not have any variables.
Functions
|
cbrt( x: ) |
Returns |
|---|---|
|
clamp01( x: ) |
Returns |
|
colorToOKLCH( color: ) |
Returns Converts a |
|
inGamut( lin: ) |
Returns |
|
lchToLinear( l: ) |
Returns |
|
linearToOklab( r: ) |
Returns |
|
oklabToLinear( L: ) |
Returns |
|
oklchToColor( l: ) |
Returns Converts OKLCH components to a By default, colors that fall outside the sRGB gamut are brought back in by reducing chroma while holding lightness and hue constant (a binary search), which preserves the intended color far better than a naive per-channel clip. |
|
toGamma( c: ) |
Returns |
|
toLinear( c: ) |
Returns |