Example usage for com.vaadin.shared.ui.colorpicker Color HSVtoRGB

List of usage examples for com.vaadin.shared.ui.colorpicker Color HSVtoRGB

Introduction

In this page you can find the example usage for com.vaadin.shared.ui.colorpicker Color HSVtoRGB.

Prototype

public static int HSVtoRGB(float hue, float saturation, float value) 

Source Link

Document

Converts HSV's hue, saturation and value into an RGB value.

Usage

From source file:org.eclipse.hawkbit.ui.common.CoordinatesToColor.java

License:Open Source License

private static Color calculateHSVColor(final int x, final int y) {
    final float h = x / 220F;
    float s = 1F;
    float v = 1F;
    if (y < 110) {
        s = y / 110F;/*from w w  w  .jav  a  2s .  com*/
    } else if (y > 110) {
        v = 1F - (y - 110F) / 110F;
    }
    return new Color(Color.HSVtoRGB(h, s, v));
}