Skip to content
Snippets Groups Projects
Commit 783cbb5f authored by brinn's avatar brinn
Browse files

fix: brightness of color mixture is the maximum effective brightness

SVN: 22414
parent 944f1b2e
No related branches found
No related tags found
No related merge requests found
...@@ -63,7 +63,7 @@ public class MixColors ...@@ -63,7 +63,7 @@ public class MixColors
for (int i = 0; i < weights.length; ++i) for (int i = 0; i < weights.length; ++i)
{ {
hue += weights[i] * colors[i].getHue(); hue += weights[i] * colors[i].getHue();
brightness = Math.max(brightness, colors[i].getBrightness()); brightness = Math.max(brightness, intensities[i] * colors[i].getBrightness());
} }
return new PureHSBColor(hue, brightness); return new PureHSBColor(hue, brightness);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment