Minor correction to alpha distribution equation.
This commit is contained in:
@@ -51,8 +51,9 @@ QColor ColorObject::getAlphaColored(unsigned int i)
|
||||
{
|
||||
const int minAlpha = 50;
|
||||
const int alphaLevels = 20 - 255 / minAlpha;
|
||||
|
||||
int alpha = minAlpha + (int)(((255. - minAlpha) / alphaLevels) * (i % alphaLevels));
|
||||
const int alphaStep = (255. - minAlpha) / alphaLevels;
|
||||
|
||||
int alpha = minAlpha + (int)(alphaStep * (i % alphaLevels));
|
||||
i = (i / alphaLevels) % numberOfColors;
|
||||
QColor result(r[i], g[i], b[i]);
|
||||
result.setAlpha(alpha);
|
||||
|
||||
Reference in New Issue
Block a user