Skip to content
pixi-silk
GitHub repository
Function

inGamut

import { inGamut } from 'pixi-silk/ui/color';
function inGamut(
   L: number, 
   C: number, 
   h: number, 
   eps?: number
): boolean;

True when the OKLCH colour fits in sRGB, with a tolerance of eps per channel.

Parameters#

ParameterTypeDefault value
Lnumberundefined
Cnumberundefined
hnumberundefined
epsnumber1e-4

Returns#

boolean