Skip to content
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

Relative Color Syntax (RCS) #894

Closed
1 task done
mysteryDate opened this issue Sep 6, 2023 · 15 comments
Closed
1 task done

Relative Color Syntax (RCS) #894

mysteryDate opened this issue Sep 6, 2023 · 15 comments
Assignees
Labels
Resolution: satisfied The TAG is satisfied with this design Topic: CSS Venue: CSS WG

Comments

@mysteryDate
Copy link

mysteryDate commented Sep 6, 2023

こんにちは TAG-さん!

I'm requesting a TAG review of Relative Color Syntax (RCS).

The new relative color syntax extends modern color syntax to allow existing colors to be modified using the color functions: if an origin color is specified, then each color channel can either be directly specified, or taken from the origin color (and possibly modified with math functions). For example:

lab(from magenta calc(l/2) a b)

Would create a lab color that is equivalent to magenta with half of the lightness.

Further details:

  • I have reviewed the TAG's Web Platform Design Principles
  • The group where the work on this specification is currently being done: csswg-drafts
  • Major unresolved issues with or opposition to this specification: None
  • This work is being funded by: Google
@LeaVerou
Copy link
Member

LeaVerou commented Sep 6, 2023

  • Primary contacts (and their relationship to the specification):

Hi there,

Curious why list only 2 of the 4 editors of the specification as primary contacts? Especially since the editor who actually proposed and specced the feature is among the 2 that were left out.

@mysteryDate
Copy link
Author

mysteryDate commented Sep 6, 2023

Curious why list only 2 of the 4 editors of the specification as primary contacts? Especially since the editor who actually proposed the feature is among the 2 that were left out.

I was trying to keep it brief and just listed the two authors with whom I'd actively been in contact. Would you like me to add the other two to the original issue post?

I also wasn't sure what organization to list for you, Lea, as you are listed as an "Invited Expert" on the spec.

@ZoeBijl
Copy link

ZoeBijl commented Sep 6, 2023

Is there an explainer for this that’s not a blog post?

@myakura
Copy link

myakura commented Sep 7, 2023

Is there an explainer for this that’s not a blog post?

unfortunately not.
https://groups.google.com/a/chromium.org/g/blink-dev/c/KeKBTjKEdaU

@mysteryDate
Copy link
Author

Is there an explainer for this that’s not a blog post?

@LeaVerou Was there an explainer that you all were working from when the spec was first written? This is not the first time that someone has wanted something more official. I could write one now, but that would feel a little post-hoc and I feel like I am far from the most knowledgable person on the subject.

@LeaVerou
Copy link
Member

LeaVerou commented Sep 7, 2023

Is there an explainer for this that’s not a blog post?

@LeaVerou Was there an explainer that you all were working from when the spec was first written? This is not the first time that someone has wanted something more official. I could write one now, but that would feel a little post-hoc and I feel like I am far from the most knowledgable person on the subject.

No, but it should be pretty easy to put one together with the info from the original proposal (which includes motivation, use cases, etc) and the updated proposal which converged on the sytnax that is currently in the spec.

I believe the differences between the current syntax and the (updated) proposal are:

  • Using a gamut-restricted color function does not clip or gamut map anymore
  • RCS for color() is now much more fleshed out than it was there.
  • The return types for each keyword are now more fleshed out, defaulting to <number> when that is allowed for the corresponding component.

@svgeesus, am I forgetting any?

@miketaylr
Copy link

The above comment and its links is as useful as an explainer; it doesn't seem worth the effort to write a new one (but if someone is really inclined to, more power to them).

@LeaVerou
Copy link
Member

LeaVerou commented Sep 8, 2023

The above comment and its links is as useful as an explainer; it doesn't seem worth the effort to write a new one (but if someone is really inclined to, more power to them).

I disagree, the whole point of explainers is that they are easy to digest, piecing the info together from several links and cross-referencing with the spec is not work that whoever is reviewing the explainer should need to do.

I would love to do the work of putting an explainer together, but I can't commit to a specific timeframe right now, and I don't want to become the bottleneck here.

@svgeesus
Copy link

svgeesus commented Sep 8, 2023

The other useful item that an explainer would provide is evidence of implementer support, so:

@svgeesus
Copy link

svgeesus commented Sep 8, 2023

Oh btw @mysteryDate

Would create a lab color that is equivalent to magenta with half of the luminance

Half the lightness. See this diagram

@svgeesus
Copy link

svgeesus commented Sep 8, 2023

Ok here is a somewhat minimal RCS Explainer

@mysteryDate
Copy link
Author

Exellent, thank you! I have updated the original comment to add the two missing authors, link to the new explainer and swap "luminance" for "lightness."

@svgeesus
Copy link

I added tests for RCS with currentColor which currently no-one passes, but the spec clearly describes what should happen so hopefully the implementations will converge to interop on that aspect.

@torgo torgo added this to the 2023-10-16-week milestone Oct 11, 2023
@rhiaro rhiaro added the Progress: propose closing we think it should be closed but are waiting on some feedback or consensus label Dec 18, 2023
@svgeesus
Copy link

Mozilla position on RCS is positive with implementation starting soon

@rhiaro rhiaro added Resolution: satisfied The TAG is satisfied with this design and removed Progress: propose closing we think it should be closed but are waiting on some feedback or consensus labels Dec 20, 2023
@rhiaro
Copy link
Contributor

rhiaro commented Dec 20, 2023

Thanks for the explainer updates, no concerns from us. 🌈

@rhiaro rhiaro closed this as completed Dec 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution: satisfied The TAG is satisfied with this design Topic: CSS Venue: CSS WG
Projects
None yet
Development

No branches or pull requests

8 participants