RFR: JDK-8292276 : Add named colors from CSS Color Module Level 4 [v28]

Alexey Ivanov aivanov at openjdk.org
Tue Feb 28 15:52:51 UTC 2023


On Mon, 27 Feb 2023 20:47:53 GMT, Alexey Ivanov <aivanov at openjdk.org> wrote:

>> ScientificWare has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Delete configure
>>   
>>   Delete configure from the pull request.
>
> src/java.desktop/share/classes/javax/swing/text/html/StyleSheet.java line 1025:
> 
>> 1023:      * and rgb or rgba HTML3.2 strings.
>> 1024:      * Otherwise, it will return null.
>> 1025:      * This method is case-insensitive.
> 
> Suggestion:
> 
>      * Note: This will only convert strings which use any of the following:
>      * <ul>
>      *   <li><a href="https://www.w3.org/TR/css-color-4/#named-colors">named colors</a>,
>      *   <li>hex color notation starting with {@code #} followed by 3, 4, 6, or 8 hexadecimal digits,
>      *   <li>`rgb()` and `rgba()` functions
>      * </ul>
>      * as specified by the <a href="https://www.w3.org/TR/css-color-4/">CSS Color Module Level 4</a>.
>      * Otherwise, it will return null.
>      * <p>
>      * This method is case-insensitive.

The _hex color notation_ and _`rgb()` and `rgba()` functions_ should link to their specifications:  
https://www.w3.org/TR/css-color-4/#hex-notation  
https://www.w3.org/TR/css-color-4/#rgb-functions  
correspondingly.

-------------

PR: https://git.openjdk.org/jdk/pull/9825



More information about the client-libs-dev mailing list