Convert HSB To RGB Color - Java 2D Graphics

Java examples for 2D Graphics:Color RGB

Description

Convert HSB To RGB Color

Demo Code


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
        }
}

Related Tutorials