JDK-4807378 : Color.brighter() and Color.darker() do not preserve alpha
  • Type: Bug
  • Component: client-libs
  • Sub-Component: 2d
  • Affected Version: 1.2.1
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: generic
  • CPU: generic
  • Submitted: 2003-01-23
  • Updated: 2021-02-11
  • Resolved: 2021-02-11
Related Reports
Duplicate :  
Description
The methods java.awt.Color.brighter() and Color.darker() always return a Color object with an alpha value of 255 (fully opaque), regardless of the alpha value of the original Color.  This is counter-intuitive and not explained by the spec.  Given the current description of these methods, it would seem most reasonable for the alpha value to be preserved.

See suggested fix.

###@###.### 2003-01-23

Comments
Please re-open if - if fix is in progress or on the plan to fix soon - if this is a P3 (file as P3, not P4)
18-03-2014

EVALUATION Color.java is owned by the 2D team. ###@###.### 2003-01-23
23-01-2003

SUGGESTED FIX The implementation of these methods should be changed to preserve the alpha value of the Color object on which the method is invoked, unchanged. Additionally, the specification for these methods should be changed to clarify that the alpha value will be preserved. ###@###.### 2003-01-23
23-01-2003