Color (@NotNull Color color, int componentIndex, float shift) { Checks.checkIndex(componentIndex, 3); float[] hsb = Color.RGBtoHSB(color.getRed(), color.getGreen(), color.getBlue(), null); hsb[componentIndex] = MathUtil.clamp(hsb[componentIndex] + shift, 0, 1); return Color.getHSBColor(hsb[0], hsb[1], hsb[2]); }