Convert HSB to RGB value : Color Model « 2D Graphics GUI « Java






Convert HSB to RGB value

   


import java.awt.Color;

public class Main {
  public static void main() {

    float hue = 12; 
    float saturation = 13;
    float brightness = 14;
    
    int rgb = Color.HSBtoRGB(hue, saturation, brightness);
    int red = (rgb >> 16) & 0xFF;
    int green = (rgb >> 8) & 0xFF;
    int blue = rgb & 0xFF;

  }
}

   
    
    
  








Related examples in the same category

1.Convert RGB to HSB
2.IndexColorModelIndexColorModel
3.Color model demoColor model demo
4.Color CompositeColor Composite
5.Image Color Effect: Brightness, Contrast, NegativeImage Color Effect: Brightness, Contrast, Negative
6.Image Color Gray EffectImage Color Gray Effect
7.Checking for Color ModelsChecking for Color Models
8.Layers - Try to use alpha values (transparency) to draw in layersLayers - Try to use alpha values (transparency) to draw in layers
9.RGB Gray Filter
10.Color Schema Generator