Yes, exactly what I would like every client to avoid writing.
Eran
From: Nir Lisker [mailto:nlis...@gmail.com]
Sent: Saturday, December 23, 2023 9:24 PM
To: Eran Leshem
Cc: Kevin Rushforth; openjfx-dev@openjdk.org
Subject: Re: Converting a Color object to its string representation
I
ay, December 13, 2023 2:46 PM
> *To:* openjfx-dev@openjdk.org
> *Subject:* Re: Converting a Color object to its string representation
>
>
>
> Or the third option:
>
> 3. Do nothing
>
> I would go for option 1 or 3. I do not recommend option 2.
>
> I see some value in a m
[mailto:openjfx-dev-r...@openjdk.org] On Behalf Of Kevin
Rushforth
Sent: Wednesday, December 13, 2023 2:46 PM
To: openjfx-dev@openjdk.org
Subject: Re: Converting a Color object to its string representation
Or the third option:
3. Do nothing
I would go for option 1 or 3. I do not recommend option 2
le methods or via an enum parameter
Eran
*From:*openjfx-dev [mailto:openjfx-dev-r...@openjdk.org] *On Behalf Of
*Andy Goryachev
*Sent:* Tuesday, December 12, 2023 6:08 PM
*To:* Scott Palmer; openjfx-dev@openjdk.org
*Subject:* Re: Converting a Color object to its string representation
I also thi
multiple methods or via an enum parameter
Eran
From: openjfx-dev [mailto:openjfx-dev-r...@openjdk.org] On Behalf Of Andy
Goryachev
Sent: Tuesday, December 12, 2023 6:08 PM
To: Scott Palmer; openjfx-dev@openjdk.org
Subject: Re: Converting a Color object to its string representation
I also
, 2023 at 17:12
To: openjfx-dev@openjdk.org
Subject: Re: Converting a Color object to its string representation
I agree. I was going to write pretty much this exact email, but you beat me to
it.
I was implementing some user-configurable colour customizations in an
application and needed to do it
to provide the inverse conversion.
>
> Eran
>
> -Original Message-
> From: openjfx-dev [mailto:openjfx-dev-r...@openjdk.org] On Behalf Of John
> Hendrikx
> Sent: Saturday, December 09, 2023 11:35 PM
> To: openjfx-dev@openjdk.org
> Subject: Re: Converting a Color
To: openjfx-dev@openjdk.org
Subject: Re: Converting a Color object to its string representation
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
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("#")
> .f
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),
(byte)(color
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 `Co
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 string
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, 2023
Hello,
Can I contribute an implementation for
https://bugs.openjdk.org/browse/JDK-8090778?
Eran
15 matches
Mail list logo