Class HSVColor

    • Field Detail

      • WHITE

        public static final transient HSVColor WHITE
        White HSV Color
      • BLACK

        public static final transient HSVColor BLACK
        Black HSV Color
      • RED

        public static final transient HSVColor RED
        Red HSV Color
      • GREEN

        public static final transient HSVColor GREEN
        Green HSV Color
      • BLUE

        public static final transient HSVColor BLUE
        Blue HSV Color
    • Constructor Detail

      • HSVColor

        public HSVColor()
      • HSVColor

        public HSVColor​(double hue,
                        double saturation,
                        double value)
    • Method Detail

      • getHue

        public double getHue()
      • setHue

        public void setHue​(double hue)
        Parameters:
        hue - to be set
        Throws:
        IllegalArgumentException - if hue is smaller than 0.0 or greater than 360.0
      • getSaturation

        public double getSaturation()
      • setSaturation

        public void setSaturation​(double saturation)
        Parameters:
        saturation - The Saturation of the HSV-Color
        Throws:
        IllegalArgumentException - if saturation is smaller than 0.0 or greater than 1.0
      • getValue

        public double getValue()
      • setValue

        public void setValue​(double value)
        Parameters:
        value - The Value of the HSV-Color
        Throws:
        IllegalArgumentException - if value is smaller than 0.0 or greater than 1.0
      • getChannel1

        public double getChannel1()
        Specified by:
        getChannel1 in interface ThreeChannelColor
        Returns:
        The first channel for the represented color
      • setChannel1

        public void setChannel1​(double channel)
        Specified by:
        setChannel1 in interface ThreeChannelColor
        Parameters:
        channel - The first channel for the represented color
      • getChannel2

        public double getChannel2()
        Specified by:
        getChannel2 in interface ThreeChannelColor
        Returns:
        The second channel for the represented color
      • setChannel2

        public void setChannel2​(double channel)
        Specified by:
        setChannel2 in interface ThreeChannelColor
        Parameters:
        channel - The second channel for the represented color
      • getChannel3

        public double getChannel3()
        Specified by:
        getChannel3 in interface ThreeChannelColor
        Returns:
        The third channel for the represented color
      • setChannel3

        public void setChannel3​(double channel)
        Specified by:
        setChannel3 in interface ThreeChannelColor
        Parameters:
        channel - The third channel for the represented color
      • isCompatibleWithType

        public boolean isCompatibleWithType​(ChannelType channelType)
        Description copied from class: Color
        Checks if color is compatible with channel type
        Overrides:
        isCompatibleWithType in class Color
        Parameters:
        channelType - to be checked
        Returns:
        true iff compatible