-
Notifications
You must be signed in to change notification settings - Fork 718
[css-color-5] What are the color functions (or color adjusters)? #4743
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
2a. The bikeshed source is
This is supposed to auto-link to their definitions, but doesn't. 2b. In Una's proposal, those would correspond to 2c. Bikeshed autolinking currently works well when one spec links to another, but only the latest version of each spec is linked to, by design. Unfortunately that means that color-5 can't link to color-4 which is an issue holding back first publication of color-5 (and several other specifications). @fantasai is working on a patch to bikeshed to allow this.
4a. In @una proposal the default colorspace is 4b. The appropriate ones are available if you switch colorspace (and colors are first converted tothat colorspace before manipulation). So for example if the colorspace is set to 4c. If you use an unavailable adjuster then the colorspace should auto-convert to the one that has this adjuster. So using 4d. Need to define what happens if you use |
For now, I went for the simpler option where the color-adjusters available depend on the colorspace. So if you want to adjust HSL hue (for example to port something you already have in sass) then you must specify |
Color-adjuster is now a defined term and is used in the grammar. Colorspace is also a defined term and (like the examples, but unlike what the grammar used to say) doesn't require the trailing I added an example of adjusting in xyz to show color mixing in linear-light space. |
I don't think adjusting individual |
Thanks, @svgeesus for adding For the |
It would only apply to those color spaces which have a hue angle, like LCH, HSL, HWB. Check out example 4 and example 5 which show the shorter and longer path respectively. Hope the diagrams explain this? |
@jonathantneal do the recent spec edits resolve your issue? |
Those examples help, as did your initial comment, and I think this is resolved, with a need to apply this knowledge to my own work. Thank you, @svgeesus, for your help, your patience, and your excellent follow through. In both levity and seriousness; I hope I will be a developer like you when I grow up. |
Uh oh!
There was an error while loading. Please reload this page.
The css-color-5 specification makes references to
<color-functions>
. Would these functions include thelightness
adjuster in Example 10? If not, what are those adjusters to be referred to as?Where might I find a definitive list of those adjusters?
Are the adjusters as follows?
lightness
,a
, andb
within the LAB color space;lightness
,chroma
, andhue
within the LCH color space;hue
,saturation
, andlightness
within HSL color space; and,red
,green
, andblue
within the RGB or SRGB color space.UPDATE: I realize now that HSL also uses
lightness
and does not useluminance
(see comment history). If I explicitly set my colorspace torgb
and then adjustlightness()
does it — A. permanently move me to the LCH colorspace; B. temporarily move me to the LCH colorspace to perform the adjustment and then move me back; C. fail; D. something else? I think it matters, because I would want to know what the computed value should be when this is natively supports, and because I would want to write a polyfill that followed that same expectation as closely as possible.The text was updated successfully, but these errors were encountered: