Class ColorBlindColorScheme

java.lang.Object
org.pushingpixels.radiance.theming.api.colorscheme.BaseColorScheme
org.pushingpixels.radiance.tools.themingdebugger.ColorBlindColorScheme
All Implemented Interfaces:
RadianceColorScheme, SchemeBaseColors, SchemeDerivedColors, RadianceTrait
Direct Known Subclasses:
DeuteranopiaColorScheme, ProtanopiaColorScheme, TritanopiaColorScheme

public class ColorBlindColorScheme extends BaseColorScheme
Base class for color schemes simulating color-blind users.
  • Field Details

    • _rgbToLms

      public double[][] _rgbToLms
      Matrix for converting RGB to LMS.
    • _lmsToRgb

      public double[][] _lmsToRgb
      Matrix for converting LMS to RGB.
    • mainUltraLightColor

      private Color mainUltraLightColor
      The main ultra-light color.
    • mainExtraLightColor

      private Color mainExtraLightColor
      The main extra-light color.
    • mainLightColor

      private Color mainLightColor
      The main light color.
    • mainMidColor

      private Color mainMidColor
      The main medium color.
    • mainDarkColor

      private Color mainDarkColor
      The main dark color.
    • mainUltraDarkColor

      private Color mainUltraDarkColor
      The main ultra-dark color.
    • foregroundColor

      private Color foregroundColor
      The foreground color.
    • origScheme

      private RadianceColorScheme origScheme
      The original color scheme.
  • Constructor Details

  • Method Details

    • getColorBlindColor

      private static Color getColorBlindColor(Color orig, double[][] rgbToLms, ColorBlindColorScheme.BlindnessKind kind, double[][] lmsToRgb)
      Converts the specified color into color-blind version.
      Parameters:
      orig - The original color.
      rgbToLms - RGB to LMS conversion matrix.
      kind - Color-blindness kind.
      lmsToRgb - LMS to RGB conversion matrix.
      Returns:
      Color-blind version of the original color.
    • mult3

      private static double[] mult3(double[][] matrix, double[] vector)
      Multiplies the specified 3x3 matrix by the specified 3x1 vector.
      Parameters:
      matrix - Matrix.
      vector - Vector.
      Returns:
      Vector multiplication.
    • getForegroundColor

      public Color getForegroundColor()
      Description copied from interface: SchemeBaseColors
      Retrieves the foreground color.
      Returns:
      Foreground color.
    • getUltraLightColor

      public Color getUltraLightColor()
      Description copied from interface: SchemeBaseColors
      Retrieves the ultra-light color.
      Returns:
      Ultra-light color.
    • getExtraLightColor

      public Color getExtraLightColor()
      Description copied from interface: SchemeBaseColors
      Retrieves the extra color.
      Returns:
      Extra color.
    • getLightColor

      public Color getLightColor()
      Description copied from interface: SchemeBaseColors
      Retrieves the light color.
      Returns:
      Light color.
    • getMidColor

      public Color getMidColor()
      Description copied from interface: SchemeBaseColors
      Retrieves the medium color.
      Returns:
      Medium color.
    • getDarkColor

      public Color getDarkColor()
      Description copied from interface: SchemeBaseColors
      Retrieves the dark color.
      Returns:
      Dark color.
    • getUltraDarkColor

      public Color getUltraDarkColor()
      Description copied from interface: SchemeBaseColors
      Retrieves the ultra-dark color.
      Returns:
      Ultra-dark color.
    • getOrigScheme

      public RadianceColorScheme getOrigScheme()
      Returns the original color scheme.
      Returns:
      The original color scheme.