Java Swing Tutorial - Java Color.getHSBColor(float h, float s, float b)








Syntax

Color.getHSBColor(float h, float s, float b) has the following syntax.

public static Color getHSBColor(float h,  float s,  float b)

Example

In the following code shows how to use Color.getHSBColor(float h, float s, float b) method.

import java.awt.Color;
//from   w ww.j  a  v  a  2s.c o  m
public class Main {
  public static void main(String[] args) {
    Color myColor = Color.getHSBColor(0.1F,  0.2F,  0.3F);          

    System.out.println(myColor);
    
  }
}

The code above generates the following result.