org.vishia.gral.base

## Class GralColorConv

- java.lang.Object
- - org.vishia.gral.base.GralColorConv

-     public class GralColorConv
      extends java.lang.Object

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `(package private) static float` | `bfbl`
    `(package private) static float` | `bfgn`
    `(package private) static float` | `bfrd`
    `(package private) static float` | `cfbl`
    `(package private) static float` | `cfgn`
    `(package private) static float` | `cfrd`
    `(package private) static float[]` | `cfrgb` Factors for rd, ye, gn, cy, bl, ma
    `(package private) static float[][]` | `clight` Sensivity of light in respect to the color.
    `(package private) static float[][]` | `clightSat`
    `(package private) static float[][]` | `clightVal` Light value in depending of hex
    `(package private) static float[][]` | `grayTable`
    `(package private) static float[][]` | `hiTable`
    `(package private) static float[][]` | `loTable`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `GralColorConv()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static int` | `HLStoRGB(float hue, float light, float sat)`
    `static int` | `HLStoRGB3(float hue, float light, float sat)` Converts a color given by hue, light and sat to rgb.
    `static void` | `HSBtoHLS(float hue, float sat, float brightness, float[] hls)`
    `static java.lang.String` | `htmlhlb(float h, int l, int s)`
    `static java.lang.String` | `htmlhls(float h, int l, int s)`
    `static float` | `ligthFromRGB(int rgb)`
    `static void` | `RGBtoHLS(int rgb, float[] hls)`
    `(package private) static float` | `RGBtoHue(int rgb)`
    `(package private) static float` | `RGBtoligth(float rd, float gn, float bl, float sat)`
    `static float` | `satFromRGB(int rgb)`
    `(package private) static void` | `XXXRGBtoHSL(int rgb, float[] hsl)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### clight

          static float[][] clight

      Sensivity of light in respect to the color. It is a table-given function used with interpolation.

    - #### clightSat

          static float[][] clightSat

    - #### clightVal

          static float[][] clightVal

      Light value in depending of hex

    - #### loTable

          static float[][] loTable

    - #### grayTable

          static float[][] grayTable

    - #### hiTable

          static float[][] hiTable

    - #### bfrd

          static float bfrd

    - #### bfgn

          static float bfgn

    - #### bfbl

          static float bfbl

    - #### cfrd

          static float cfrd

    - #### cfgn

          static float cfgn

    - #### cfbl

          static float cfbl

    - #### cfrgb

          static float[] cfrgb

      Factors for rd, ye, gn, cy, bl, ma

  - ### Constructor Detail

    - #### GralColorConv

          public GralColorConv()

  - ### Method Detail

    - #### HLStoRGB

          public static int HLStoRGB(float hue,
                                     float light,
                                     float sat)

    - #### HLStoRGB3

          public static int HLStoRGB3(float hue,
                                      float light,
                                      float sat)

      Converts a color given by hue, light and sat to rgb.
      Parameters:
        `hue` - The color in range 0..24.0. 0 is magenta, 4: red, 8 yellow, 12 green 16 cyan, 20 blue, 24 magenta.
        `light` - The light, 0 to 2.0. 1.0 is the saturated red 0xff0000 or a darker yellow. 1.4 is yellow 0xffff00. till 2.0 it uses the base values for color in white direction. 2.0 it is white.
        `sat` - Saturation 0..1. part of gray. 1.0 is non-gray. 0 is full gray.
      Returns:
        rgb

    - #### HSBtoHLS

          public static void HSBtoHLS(float hue,
                                      float sat,
                                      float brightness,
                                      float[] hls)

    - #### RGBtoHLS

          public static void RGBtoHLS(int rgb,
                                      float[] hls)

    - #### XXXRGBtoHSL

          static void XXXRGBtoHSL(int rgb,
                                  float[] hsl)

    - #### satFromRGB

          public static float satFromRGB(int rgb)

    - #### ligthFromRGB

          public static float ligthFromRGB(int rgb)

    - #### RGBtoHue

          static float RGBtoHue(int rgb)

    - #### RGBtoligth

          static float RGBtoligth(float rd,
                                  float gn,
                                  float bl,
                                  float sat)

    - #### htmlhls

          public static java.lang.String htmlhls(float h,
                                                 int l,
                                                 int s)

    - #### htmlhlb

          public static java.lang.String htmlhlb(float h,
                                                 int l,
                                                 int s)