-
Notifications
You must be signed in to change notification settings - Fork 21
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
rewrite colour support #13
Comments
Currently working on a HUSL port to Go. |
Currently it's only used by SetHue which can be called from CartoCSS with -mc-set-hue. |
My Go implementation of HUSL can be found here: https://github.com/husl-colors/husl-go |
@olt What is the use case of this custom expression (-mc-set-hue)? |
It sets the hue of A to the hue of B. So that you get a new color with the same saturation/lightness of A, but the hue of B. |
Solved by merging #15. |
I found a HuSL implementation in your code, but it is currently not accessible from CartoCSS. Additionally, HSL colour definitions are not supported yet.
Maybe it would be beneficial to rewrite colour support to some generic colour type, which is converted to RGB(A) at the end. Compare mapbox/carto#422, where I defined colours internally as HSLA including a flag if we are in perceptual space or not.
I tried to implement HSLA support, but got stuck at
magnacarto/builder/mapnik/serialize.go
Line 580 in 2537d1e
Another thing: it might be better to move the HuSL implementation to some external library.
The text was updated successfully, but these errors were encountered: