Class RgbTriplet

java.lang.Object
de.xima.fc.color.RgbTriplet
All Implemented Interfaces:
Serializable

public final class RgbTriplet extends Object implements Serializable
Represents an RGB color triplet.
Author:
XIMA MEDIA GmbH
See Also:
  • Method Details

    • equals

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

      public int getBlueInt()
    • getBlueNorm

      public double getBlueNorm()
    • getGreenInt

      public int getGreenInt()
    • getGreenNorm

      public double getGreenNorm()
    • getHex

      public String getHex()
    • getRedInt

      public int getRedInt()
    • getRedNorm

      public double getRedNorm()
    • getRgb

      public int getRgb()
    • hashCode

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

      public RgbTriplet scaled(double scaleRed, double scaleGreen, double scaleBlue)
      Parameters:
      scaleRed - Scale for the red value.
      scaleGreen - Scale for the green value.
      scaleBlue - Scale for the blue value.
      Returns:
      Scales all components by the given factors.
    • toCssColor

      public CssColor toCssColor()
    • toHslUvTriplet

      public HslUvTriplet toHslUvTriplet()
    • toHsvTriplet

      public HsvTriplet toHsvTriplet()
    • toString

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

      public static RgbTriplet of(double red, double green, double blue)
    • of

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

      public static RgbTriplet of(long rgb)
    • of

      public static RgbTriplet of(long red, long green, long blue)
    • of

      public static RgbTriplet of(String hexString)
    • of

      public static RgbTriplet of(String hexString, RgbTriplet defaultValue)