Package org.jsignal.std
Class ColorUtil
java.lang.Object
org.jsignal.std.ColorUtil
Uses D65 as default white point for all color spaces
-
Field Summary
Modifier and TypeFieldDescriptionstatic final io.github.humbleui.skija.Matrix33
static final io.github.humbleui.skija.Matrix33
static final io.github.humbleui.skija.Matrix33
static final io.github.humbleui.skija.Matrix33
static final io.github.humbleui.skija.Matrix33
static final io.github.humbleui.skija.Matrix33
static final io.github.humbleui.skija.Matrix33
static final io.github.humbleui.skija.Matrix33
static final float[]
static final float[]
static final float[]
static final float[]
static final io.github.humbleui.skija.Matrix33
static final io.github.humbleui.skija.Matrix33
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic float[]
bradfordChromaticAdapt
(float[] ws, float[] wd, float[] source) static int
brighten
(int color, float factor) static float[]
clamp
(float[] arr) static float
clamp
(float min, float max, float value) static int
contrastText
(int color) static int
contrastText
(int color, int dark, int light) static float[]
hslFromRgb
(int color) static float[]
linearizeSrgb
(float[] arr) static float[]
linearSrgbFromXyz
(float[] arr) static float[]
oklabFromOklch
(float[] arr) static float[]
oklabFromXyz
(float[] arr) static float[]
oklchFromOklab
(float[] arr) static float
perceptualQuantizer
(float v) static float
perceptualQuantizerInverse
(float v) static int
rgbFromHsl
(float[] hsl) static int
rgbFromHsl
(float h, float s, float l, float alpha) static int
rgbFromSrgb
(float[] arr) static float[]
srgbFromRgb
(int color) static int
withAlpha
(int color, float alpha) static float[]
xyzFromLinearSrgb
(float[] arr) static float[]
xyzFromOklab
(float[] arr)
-
Field Details
-
SRGB_TO_XYZ
public static final io.github.humbleui.skija.Matrix33 SRGB_TO_XYZ -
XYZ_TO_SRGB
public static final io.github.humbleui.skija.Matrix33 XYZ_TO_SRGB -
XYZ_TO_OKLMS
public static final io.github.humbleui.skija.Matrix33 XYZ_TO_OKLMS -
OKLMS_TO_XYZ
public static final io.github.humbleui.skija.Matrix33 OKLMS_TO_XYZ -
OKLMS_PRIME_TO_OKLAB
public static final io.github.humbleui.skija.Matrix33 OKLMS_PRIME_TO_OKLAB -
OKLAB_TO_OKLMS_PRIME
public static final io.github.humbleui.skija.Matrix33 OKLAB_TO_OKLMS_PRIME -
BRADFORD_MA
public static final io.github.humbleui.skija.Matrix33 BRADFORD_MA -
BRADFORD_MA_INV
public static final io.github.humbleui.skija.Matrix33 BRADFORD_MA_INV -
CIECAM02_MA
public static final io.github.humbleui.skija.Matrix33 CIECAM02_MA -
CIECAM02_MA_INV
public static final io.github.humbleui.skija.Matrix33 CIECAM02_MA_INV -
XYZ_D50
public static final float[] XYZ_D50 -
XYZ_D55
public static final float[] XYZ_D55 -
XYZ_D65
public static final float[] XYZ_D65 -
XYZ_D75
public static final float[] XYZ_D75
-
-
Constructor Details
-
ColorUtil
public ColorUtil()
-
-
Method Details
-
bradfordChromaticAdapt
public static float[] bradfordChromaticAdapt(float[] ws, float[] wd, float[] source) -
srgbFromRgb
public static float[] srgbFromRgb(int color) -
rgbFromSrgb
public static int rgbFromSrgb(float[] arr) -
perceptualQuantizer
public static float perceptualQuantizer(float v) -
perceptualQuantizerInverse
public static float perceptualQuantizerInverse(float v) -
linearizeSrgb
public static float[] linearizeSrgb(float[] arr) -
clamp
public static float[] clamp(float[] arr) -
clamp
public static float clamp(float min, float max, float value) -
xyzFromLinearSrgb
public static float[] xyzFromLinearSrgb(float[] arr) -
linearSrgbFromXyz
public static float[] linearSrgbFromXyz(float[] arr) -
oklabFromXyz
public static float[] oklabFromXyz(float[] arr) -
xyzFromOklab
public static float[] xyzFromOklab(float[] arr) -
oklchFromOklab
public static float[] oklchFromOklab(float[] arr) -
oklabFromOklch
public static float[] oklabFromOklch(float[] arr) -
contrastText
public static int contrastText(int color) -
contrastText
public static int contrastText(int color, int dark, int light) -
brighten
public static int brighten(int color, float factor) -
hslFromRgb
public static float[] hslFromRgb(int color) -
rgbFromHsl
public static int rgbFromHsl(float[] hsl) -
rgbFromHsl
public static int rgbFromHsl(float h, float s, float l, float alpha) -
withAlpha
public static int withAlpha(int color, float alpha)
-