(int color, int a)
| 41 | } |
| 42 | |
| 43 | public static int withA(int color, int a) { |
| 44 | assert 0 <= a && a <= 255 : "Alpha is out of 0..255 range: " + a; |
| 45 | return ((a & 0xFF) << 24) | (color & 0x00FFFFFF); |
| 46 | } |
| 47 | |
| 48 | public static int withR(int color, int r) { |
| 49 | assert 0 <= r && r <= 255 : "Red is out of 0..255 range: " + r; |
no outgoing calls