JDK-8293776 : Adds CSS 4 and 8 digits hex coded Color
  • Type: Enhancement
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 17
  • Priority: P4
  • Status: Open
  • Resolution: Unresolved
  • OS: generic
  • CPU: generic
  • Submitted: 2022-09-10
  • Updated: 2022-09-19
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
tbdUnresolved
Related Reports
Relates :  
Description
A DESCRIPTION OF THE PROBLEM :
The present CSS implementation accepts 3 digits and 6 digits hex coded Color :
With the CSS 1 convention : #rgb must be interpreted as #rrggbb.
With 4 and 5 digits, last missing digits are replaced with 0 (This is not a CSS recommendation)

Then #f0a is interpreted as #ff00aa opaque Color. 
And #f00a is interpreted as #00f00a opaque Color.

I request to reach CSS Color Level 4 recommendation which accepts 3, 4, 6 and 8 digits.
With the following conventions :
- #rgb must be interpreted as #rrggbb opaque Color.
- #rgba must be interpreted as #rrggbbaa Color with an aa Alpha value.
- #rrggbb must be interpreted as #rrggbb opaque Color.
- #rrggbbaa must be interpreted as  #rrggbbaa Color with an aa Alpha value.

I can provide such implementation. Details and the code to test the present implementation at https://github.com/scientificware/jdk/issues/13.



Comments
A pull request was submitted for review. URL: https://git.openjdk.org/jdk/pull/10317 Date: 2022-09-16 23:16:19 +0000
16-09-2022