Java examples for 2D Graphics:Color RGB
Convert HSB To RGB Color
import java.applet.Applet; import java.awt.Color; import java.awt.Graphics; public class Main { public void paint(Graphics g){ int rgb = Color.HSBtoRGB(0.6f,0.5f,0.8f); //create new color from the RGB value Color color = new Color(rgb); // w w w .j a v a 2s. c o m } }