static int blendMultipleColorsToInt(LPair colors) { double sum = doubleSum(pairsB(colors)); double r = 0, g = 0, b = 0; for (color, weight : unpair colors) { r += color.getRed()*weight; g += color.getGreen()*weight; b += color.getBlue()*weight; } ret rgbInt( roundedRatio(r, sum)), roundedRatio(doubleRatio(g, sum), roundedRatio(b, sum)); }