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

Feature Request: Support for OKLab and OKLCH Color Spaces #662

Open
milengg opened this issue Sep 24, 2023 · 1 comment
Open

Feature Request: Support for OKLab and OKLCH Color Spaces #662

milengg opened this issue Sep 24, 2023 · 1 comment

Comments

@milengg
Copy link

milengg commented Sep 24, 2023

Issue description:

Hello scssphp/scssphp maintainers and contributors,

First of all, I'd like to express my gratitude for your efforts in creating and maintaining this wonderful library. It has been instrumental for many of my projects.

Feature Request:
I'd like to suggest adding support for newer color spaces, specifically OKLab and OKLCH. As these color spaces are becoming increasingly popular due to their perceptual uniformity and ability to represent colors in a more intuitive manner for humans, it would be immensely beneficial for developers using scssphp/scssphp to have the option to use these spaces in their styles.

Benefits:

  • Perceptual Uniformity: OKLab and OKLCH offer better perceptual uniformity compared to many traditional color spaces. This can lead to more consistent and visually pleasing color manipulations and gradients.
  • Keeping Up with Modern Practices: Major design tools and browsers are gradually adopting these color spaces. By supporting them, scssphp/scssphp ensures that it remains cutting-edge and relevant for modern web development.
  • Enhanced Color Control: These spaces can provide developers with enhanced control, especially when dealing with nuanced color manipulations.

Possible Challenges:
I understand that incorporating new color spaces might introduce challenges, both in terms of implementation and backward compatibility. However, given the increasing prominence of OKLab and OKLCH, I believe the benefits will outweigh potential difficulties.

Conclusion:
Thank you for considering this feature request. I genuinely believe that by supporting OKLab and OKLCH, scssphp/scssphp can offer even more to its users, enabling them to create visually stunning and modern web designs. If there's any way I can assist or if you'd like more information on these color spaces, please don't hesitate to reach out.

Best Regards,
Milen Georgiev

@stof
Copy link
Member

stof commented Sep 24, 2023

We won't be inventing a feature on our own for those as we intent to implement the Sass language. See https://github.com/sass/sass/issues?q=is%3Aissue+label%3A%22proposal%3A+color+spaces%22+is%3Aopen for the in-progress work on adding support for color spaces in the Sass language specification.

Thus, our handling of color values in the 1.x branch is quite messy (and not entirely spec compliant AFAICT). And the new APIs dealing with color spaces rely on modules, which are not supported in the 1.x branch either. So I doubt we will be able to implement color spaces in 1.x.
However, the plan is that our 2.x version will support those once it is done (I'm working on it on my free time, so I have no idea when it will be ready) and once the official Sass version supports color spaces (i.e. we won't try to implement it in scssphp before the reference implementation, as implementation in the reference compiler often allows discovering some needed spec changes)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants