I'm trying to create a method that mixes two ARGB colors (the second one being on top) to a color with an alpha of 0xFF
, i could just be blind but after 30 minutes of googling i can't seem to find a way to do this. Also this method has to be decently fast because all the other methods i tried that didn't work (for me?) slowed my program down from 200FPS to 40FPS.
For example if i would do mix(0xFF0F1F3F, 0x7FFFFFFF)
i would get light blue-ish color and mix(0x7FFFFFFF, 0xFF0F1F3F)
would return 0xFF0F1F3F
because it has an alpha of 0xFF
.
My current code:
private int mix(int argbA, int argbB) {
int argbC = 0;
// Color mixing code
return argbC;
}