Class ClientOpaqueColor

  • All Implemented Interfaces:
    Serializable

    public final class ClientOpaqueColor
    extends Object
    implements Serializable
    Represents an opaque (=no transparency) color for a node or trigger.
    Since:
    7.0.0
    Author:
    XIMA MEDIA GmbH
    See Also:
    Serialized Form
    • Constructor Detail

      • ClientOpaqueColor

        @Deprecated
        public ClientOpaqueColor()
        Deprecated.
        Use that static methods, this is required for JSON de/serialization.
    • Method Detail

      • getBlue

        @Nonnull
        public int getBlue()
        Returns:
        The blue channel of the color, in the range [0,255].
      • getGreen

        @Nonnull
        public int getGreen()
        Returns:
        The green channel of the color, in the range [0,255].
      • getRed

        @Nonnull
        public int getRed()
        Returns:
        The red channel of the color, in the range [0,255].
      • setBlue

        public void setBlue​(int blue)
        Parameters:
        blue - The blue channel of the color, in the range [0,255].
      • setGreen

        public void setGreen​(int green)
        Parameters:
        green - The green channel of the color, in the range [0,255].
      • setRed

        public void setRed​(int red)
        Parameters:
        red - The red channel of the color, in the range [0,255].
      • gray

        public static ClientOpaqueColor gray​(int amount)
        Parameters:
        amount - The amount of gray, from 0 (black) to 255 (white).
        Returns:
        A gray shade with the given amount.
      • ofRgb

        public static ClientOpaqueColor ofRgb​(int red,
                                              int green,
                                              int blue)
        Parameters:
        red - The red channel of the color, in the range [0,255].
        green - The green channel of the color, in the range [0,255].
        blue - The blue channel of the color, in the range [0,255].
        Returns:
        A new color instance with the red, green, and blue channel.
      • ofRgb

        public static ClientOpaqueColor ofRgb​(int rgb)
        Parameters:
        rgb - Hexadecimal rgb value, e.g. 0x40F3A2.
        Returns:
        A new color instance with the red, green, and blue channel.