Class HslUvTriplet

java.lang.Object
de.xima.fc.color.HslUvTriplet
All Implemented Interfaces:
IOpaqueRgbHexColorProviding, Serializable

public final class HslUvTriplet extends Object implements IOpaqueRgbHexColorProviding, Serializable
Represents an HSLul color triplet, see https://www.hsluv.org/
Author:
XIMA MEDIA GmbH
See Also:
  • Method Details

    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • getHex

      public String getHex()
    • getHsl

      public int getHsl()
    • getHueInt

      public int getHueInt()
    • getHueNorm

      public double getHueNorm()
    • getLightnessInt

      public int getLightnessInt()
    • getLightnessNorm

      public double getLightnessNorm()
    • getOpaqueRgbHexColor

      public int getOpaqueRgbHexColor()
      Description copied from interface: IOpaqueRgbHexColorProviding
      Gets the opaque color as a hex RGB value, e.g. 0x#FF0000 for red.
      Specified by:
      getOpaqueRgbHexColor in interface IOpaqueRgbHexColorProviding
      Returns:
      The hex RGB value of the color.
    • getSaturationInt

      public int getSaturationInt()
    • getSaturationNorm

      public double getSaturationNorm()
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • scaled

      public HslUvTriplet scaled(double scaleHue, double scaleSaturation, double scaleLightness)
      Parameters:
      scaleHue - Scale for the hue value.
      scaleSaturation - Scale for the saturation value.
      scaleLightness - Scale for the lightness value.
      Returns:
      Scales all components by the given factors.
    • toRgbTriplet

      public RgbTriplet toRgbTriplet()
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • with

      public HslUvTriplet with(Double newHue, Double newSaturation, Double newLightness)
    • of

      public static HslUvTriplet of(double hue, double saturation, double value)
    • of

      public static HslUvTriplet of(double[] components)
    • of

      public static HslUvTriplet of(long hsl)
    • of

      public static HslUvTriplet of(long hue, long saturation, long lightness)
    • of

      public static HslUvTriplet of(String hexString)