Color: RGBtoHSB(int r, int g, int b, float[] hsbvals) : Color « java.awt « Java by API






Color: RGBtoHSB(int r, int g, int b, float[] hsbvals)

  


import java.awt.Color;

public class Main {
  public static void main() {
    int red = 23;
    int green = 66;
    int blue = 99;

    float[] hsb = Color.RGBtoHSB(red, green, blue, null);
    float hue = hsb[0]; 
    float saturation = hsb[1];
    float brightness = hsb[2];

  }
}

   
    
  








Related examples in the same category

1.Color.GRAY
2.Color.lightGray
3.Color.magenta
4.Color.pink
5.new Color(int r, int g, int b)
6.new Color(int rgb)
7.Color: equals(Object obj)
8.Color: getComponents(float[] compArray)
9.Color: getRGB()
10.Color: HSBtoRGB(float hue,float saturation,float brightness)