Converting from HSV (HSB in Java) to RGB without using java.awt.Color (disallowed on Google App Engine)

前端 未结 7 1207
独厮守ぢ
独厮守ぢ 2020-12-09 12:44

I figured I should post this question, even if I have already found a solution, as a Java implementation was not readily available when I searched for it.

Using HSV

7条回答
  •  渐次进展
    2020-12-09 13:08

    Using SWT you can use following code snippet:

    RGB rgb = new RGB(r, g, b);
    float[] hsbColor = rgb.getHSB();
    rgb = new RGB(hsbColor[0], hsbColor[1], hsbColor[2]);
    

提交回复
热议问题