Class ColorUtil

java.lang.Object
org.jsignal.std.ColorUtil

public class ColorUtil extends Object
Uses D65 as default white point for all color spaces
  • 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)