<div dir="ltr">I don't disagree.  It's a minor thing that I can workaround for now.<div>I would like to see improved support for CSS standards though. From the little reading I did, it seems full CSS compliance would be very complex, so I'm not sure what level of support to expect in JavaFX.  Standard functions for deriving colors though would be welcome.</div><div><br></div><div>Scott</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Jan 17, 2023 at 12:34 PM Michael Strauß <<a href="mailto:michaelstrau2@gmail.com">michaelstrau2@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">I don't think it makes a lot of sense to add even more non-standard<br>
functions to JavaFX CSS. Instead we should work towards bringing our<br>
implementation closer to the web standard.<br>
You wrote that it might not be worth to wait for the standard; does<br>
that mean that you'd get a lot of value from this proposed feature?<br>
Improving one line of code in Modena.css is probably not enough justification.<br>
<br>
On Sun, Jan 15, 2023 at 1:31 AM Scott Palmer <<a href="mailto:swpalmer@gmail.com" target="_blank">swpalmer@gmail.com</a>> wrote:<br>
><br>
> I was looking at Modena.css and came across this:<br>
><br>
>     /* A bright blue for the focus indicator of objects. Typically used as the<br>
>      * first color in -fx-background-color for the "focused" pseudo-class. Also<br>
>      * typically used with insets of -1.4 to provide a glowing effect.<br>
>      */<br>
>     -fx-focus-color: #039ED3;<br>
>     -fx-faint-focus-color: #039ED322;<br>
><br>
> I noticed two things pertaining to -fx-faint-focus-color.  Although I've used this form to specify colors myself, the JavaFX CSS Reference Guide at <a href="https://openjfx.io/javadoc/19/javafx.graphics/javafx/scene/doc-files/cssref.html#typecolor" rel="noreferrer" target="_blank">https://openjfx.io/javadoc/19/javafx.graphics/javafx/scene/doc-files/cssref.html#typecolor</a> does not mention being able to use an 8-digit form of #rrggbbaa when using hex digits. Only the 3- and 6-digit forms of hexadecimal RGB are mentioned. RGB + Alpha colors are only documented in the form of rgba(#,#,#,#) and rgba(#%,#%,#%,#).<br>
><br>
> More importantly, this is a copy of -fx-focus-color with an added alpha channel, but it's created by repeating the literal color value and appending the alpha component, rather than somehow deriving it from -fx-focus-color.  Similar repetition is needed for the semi-transparent chart colors.<br>
><br>
> Would it make sense to add support for something similar to derive( <color> , <number>% ) to specify a color based on an existing color with a new value for the alpha channel (or any other) value? Maybe a color-transform method that would do for an RGBA color vector what other transforms do for spatial coordinates?*<br>
><br>
> Regards,<br>
><br>
> Scott<br>
><br>
> * Note: It seems future CSS standards are looking for ways to do similar things.  A color-mod function was proposed in <a href="https://www.w3.org/TR/2016/WD-css-color-4-20160705/#funcdef-color-mod" rel="noreferrer" target="_blank">https://www.w3.org/TR/2016/WD-css-color-4-20160705/#funcdef-color-mod</a> but removed in the next revision <a href="https://www.w3.org/TR/2022/CRD-css-color-4-20221101/#changes-from-20160705" rel="noreferrer" target="_blank">https://www.w3.org/TR/2022/CRD-css-color-4-20221101/#changes-from-20160705</a>.  I'm not following CSS development closely, but some googling suggests the next proposal is based on a new keyword 'from' to create derived colors.  E.g rgb(from skyblue, 255 g b) to get a color based on skyblue with a red component of 255.  This is mentioned here <a href="https://github.com/w3c/csswg-drafts/issues/3187#issuecomment-499126198" rel="noreferrer" target="_blank">https://github.com/w3c/csswg-drafts/issues/3187#issuecomment-499126198</a>  I'm skeptical that it is worth waiting for the dust to settle on the CSS standard, but supporting whatever they come up with is a possibility.<br>
><br>
</blockquote></div>