RFR: JDK-8293776 : Adds CSS 4 and 8 digits hex coded Color [v6]
Alexey Ivanov
aivanov at openjdk.org
Fri Sep 23 17:12:07 UTC 2022
On Fri, 23 Sep 2022 04:06:48 GMT, ScientificWare <duke at openjdk.org> wrote:
> I'm going to work on rgb() and rgba() notations (https://bugs.openjdk.org/browse/JDK-8294090). Could we let this unchanged or differ this change ?
How is this comment related to the `rgb()` and `rgba()` functions?
I think using `color.getRGB()` and comparing the value to a hex-number representing the colour (with the alpha byte moved to the higher byte of the double word) is concise and clear.
My other point was that you still validate the red, green and blue components of the color but you don't read them from the color parsed on line 68. If you don't update `red`, `green` and `blue`, they're not changed, verifying the values for the second time won't catch an error even if `styleSheet.stringToColor` returned a different color.
-------------
PR: https://git.openjdk.org/jdk/pull/10317
More information about the client-libs-dev
mailing list