(int color, int g)
| 51 | } |
| 52 | |
| 53 | public static int withG(int color, int g) { |
| 54 | assert 0 <= g && g <= 255 : "Green is out of 0..255 range: " + g; |
| 55 | return ((g & 0xFF) << 8) | (color & 0xFFFF00FF); |
| 56 | } |
| 57 | |
| 58 | public static int withB(int color, int b) { |
| 59 | assert 0 <= b && b <= 255 : "Blue is out of 0..255 range: " + b; |