Dear users, Please note that, from Monday, August 16, 2019, RSA keys shorter than 2048bit will no longer be accepted for security reasons. Please update your keys as needed before this date. If you need assistance with regard to this process, please contact sia@list.lu

Thank you for your understanding.

Commit 7796fee3 authored by Nico Mack's avatar Nico Mack

Fixed a bug with handling of alpha values when changing hue, saturation

or brightness
parent 22136e1c
......@@ -140,8 +140,9 @@ public class ColorFactory {
hsb[HUE] *= factor;
int rgb = Color.HSBtoRGB(hsb[HUE], hsb[SATURATION], hsb[BRIGHTNESS]);
rgb |= ((alpha << 24) & 0xFF000000);
return new Color(rgb);
rgb &= 0x00FFFFFF;
rgb |= (alpha << 24);
return new Color(rgb, true);
}
// ---------------------------------------------------------------------------
......@@ -162,8 +163,9 @@ public class ColorFactory {
hsb[SATURATION] *= factor;
int rgb = Color.HSBtoRGB(hsb[HUE], hsb[SATURATION], hsb[BRIGHTNESS]);
rgb |= ((alpha << 24) & 0xFF000000);
return new Color(rgb);
rgb &= 0x00FFFFFF;
rgb |= (alpha << 24);
return new Color(rgb, true);
}
// ---------------------------------------------------------------------------
......@@ -184,8 +186,9 @@ public class ColorFactory {
hsb[BRIGHTNESS] *= factor;
int rgb = Color.HSBtoRGB(hsb[HUE], hsb[SATURATION], hsb[BRIGHTNESS]);
rgb |= ((alpha << 24) & 0xFF000000);
return new Color(rgb);
rgb &= 0x00FFFFFF;
rgb |= (alpha << 24);
return new Color(rgb, true);
}
// ---------------------------------------------------------------------------
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment