Skip to content
This repository has been archived by the owner on Jan 12, 2024. It is now read-only.

v0.16.x regression in color math #443

Closed
springmeyer opened this issue Apr 26, 2016 · 4 comments
Closed

v0.16.x regression in color math #443

springmeyer opened this issue Apr 26, 2016 · 4 comments

Comments

@springmeyer
Copy link

@water: #a0c8f0;

#water {
  polygon-fill: @water - #111;
}

This gives #8fb7df in carto v0.15.x and #838383 in carto v0.16.x

springmeyer pushed a commit that referenced this issue Apr 26, 2016
@springmeyer
Copy link
Author

/cc @nebulon42 - any idea what might have caused this change?

@nebulon42
Copy link
Collaborator

Yes, there were two things: First, it was possible that the hue value was NaN for greyscale colours, which led to unexpected results in the math operation. Second, math operations on colours have to be done in RGB for backwards compatibility.

Fixed now.

@nebulon42 nebulon42 added this to the 0.16.2 milestone Apr 26, 2016
@pnorman
Copy link
Contributor

pnorman commented Apr 26, 2016

fwiw, I'm not sure that subtracting one color from another and rendering the result makes sense. When you subtract colours you get a colour difference, which you could then add to another colour. The semantics of this are similar to datetimes and intervals

@springmeyer
Copy link
Author

Great work, thank you @nebulon42! Just published v0.16.2.

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

No branches or pull requests

3 participants