Class ColorWheelWidget.HSB

  • Enclosing class:
    ColorWheelWidget

    protected static class ColorWheelWidget.HSB
    extends Object
    The class represents a color using Hue, Saturation, Brightness color scheme.
    This scheme is the best here since it provides one-to-one relation with color wheel (hue, saturation) and slider (brightness).
    • Constructor Detail

      • HSB

        public HSB​(double hue,
                   double saturation,
                   double brightness)
        Parameters:
        hue -
        saturation -
        brightness -
    • Method Detail

      • getHue

        public double getHue()
        Returns:
        the hue, in radians
      • setHue

        public void setHue​(double hue)
        Parameters:
        hue - the hue to set, in radiant
      • getHueDegrees

        public float getHueDegrees()
        Returns:
        the hue, in degrees
      • setHueDegrees

        public void setHueDegrees​(float hueDegrees)
        Parameters:
        hue - the hue to set, in degrees
      • getSaturation

        public double getSaturation()
        Returns:
        the saturation
      • setSaturation

        public void setSaturation​(double saturation)
        Parameters:
        saturation - the saturation to set
      • getBrightness

        public double getBrightness()
        Returns:
        the brightness
      • setBrightness

        public void setBrightness​(double brightness)
        Parameters:
        brightness - the brightness to set
      • getRGB

        public org.eclipse.swt.graphics.RGB getRGB()
        Returns:
        The value of the color in RGB color scheme
      • setRGB

        public void setRGB​(org.eclipse.swt.graphics.RGB rgb)
        Sets the value from the object in RGB color scheme