Java Example Program / Sample Source Code
import java.awt.Color;
public class HSBToRGBExample {
public static void main(String[] args) {
float hue = 0.58333f;
float saturation = .66667f;
float brightness = .6f;
int rgb = Color.HSBtoRGB(hue, saturation, brightness);
int red = (rgb >> 16) & 0xFF;
int green = (rgb >> 8) & 0xFF;
int blue = rgb & 0xFF;
System.out.println(red + " " + green + " " + blue);
}
} |
|
|