也许有人知道
Java(
Android)中的一种方法是将HUE应用于颜色代码?
例如,如果我有#1589FF并应用180 HUE,我应该得到#FF8B14.
解决方法
这应该做的伎俩:
Color c = new Color(0x15,0x89,0xFF); // Get saturation and brightness. float[] hsbVals = new float[3]; Color.RGBtoHSB(c.getRed(),c.getGreen(),c.getBlue(),hsbVals); // Pass .5 (= 180 degrees) as HUE c = new Color(Color.HSBtoRGB(0.5f,hsbVals[1],hsbVals[2]));