I think this is too niche to have Color provide.
Just make a utility method for whatever format you desire, instead of
making Color responsible for half a dozen ways of formatting colors, and
then probably still missing some format that someone needs.
Ticket should be closed as won't fix.
I obviously meant to write withPrefix("#"), not withDelimiter("#")...
On Sat, Dec 9, 2023 at 9:57 PM Michael Strauß wrote:
>
> How would HexFormat work with Color, other than using an extremely
> unwieldy syntax?
>
> String formatted = HexFormat.of()
> .withDelimiter("#")
>
How would HexFormat work with Color, other than using an extremely
unwieldy syntax?
String formatted = HexFormat.of()
.withDelimiter("#")
.formatHex(new byte[] {
(byte)(color.getRed() * 255.0f),
(byte)(color.getGreen() * 255.0f),
Apologies - java.util.HexFormat
That's what I get for firing from the hip, then looking afterwards.
On Sat, Dec 9, 2023, 3:38 PM David Alayachew
wrote:
> Doesn't HexDigits cover 3/4 of these cases?
>
> On Sat, Dec 9, 2023, 1:20 PM Michael Strauß
> wrote:
>
>> If we are going to revisit the
Doesn't HexDigits cover 3/4 of these cases?
On Sat, Dec 9, 2023, 1:20 PM Michael Strauß wrote:
> If we are going to revisit the `Color` class, maybe we want to provide
> a more comprehensive string formatting API, for example:
> - full-length web strings (e.g. "#ffad341c")
> - compact web
If we are going to revisit the `Color` class, maybe we want to provide
a more comprehensive string formatting API, for example:
- full-length web strings (e.g. "#ffad341c")
- compact web strings (e.g. "#ccc")
- with/without the leading #
- nearest named color ("darkgoldenrod")
On Sat, Dec 9,
> This PR enhances the documentation of `Platform.Preferences.accentColor`:
>
>
>/**
> - * The accent color.
> + * The accent color, which can be used to highlight the active or
> important part of a
> + * control and make it stand out from the rest of the user interface. It
> is
On Sat, 9 Dec 2023 09:33:13 GMT, Nir Lisker wrote:
>> Michael Strauß has updated the pull request incrementally with one
>> additional commit since the last revision:
>>
>> wording, table styling
>
> modules/javafx.graphics/src/main/java/javafx/application/Platform.java line
> 596:
>
>>
On Sat, 9 Dec 2023 16:20:30 GMT, Kevin Rushforth wrote:
>> Michael Strauß has updated the pull request incrementally with one
>> additional commit since the last revision:
>>
>> wording, table styling
>
> modules/javafx.graphics/src/main/java/javafx/application/Platform.java line
> 473:
>
Hello,
Can I contribute an implementation for
https://bugs.openjdk.org/browse/JDK-8090778?
Eran
On Thu, 2 Nov 2023 15:31:40 GMT, Andy Goryachev wrote:
>> Modified the resize algorithm to work well with fractional scale, thanks for
>> deeper understanding of the problem thanks to @hjohn and @mstr2 .
>>
>> It is important to note that even though the constraints are given by the
>> user
On Sat, 9 Dec 2023 08:40:31 GMT, Michael Strauß wrote:
>> This PR enhances the documentation of `Platform.Preferences.accentColor`:
>>
>>
>>/**
>> - * The accent color.
>> + * The accent color, which can be used to highlight the active or
>> important part of a
>> + * control and
On Sat, 9 Dec 2023 07:25:17 GMT, Nir Lisker wrote:
>> Michael Strauß has updated the pull request incrementally with one
>> additional commit since the last revision:
>>
>> wording, table styling
>
> modules/javafx.graphics/src/main/java/javafx/application/Platform.java line
> 612:
>
>>
> This PR enhances the documentation of `Platform.Preferences.accentColor`:
>
>
>/**
> - * The accent color.
> + * The accent color, which can be used to highlight the active or
> important part of a
> + * control and make it stand out from the rest of the user interface. It
> is
14 matches
Mail list logo