You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The acescc color space has coords with a range of [-0.358, 1.468].
The percentageRange function of the Type class was returning a
value of [-1, 1] which caused coords specified as percentages to be
calculated incorrectly.
The percentageRange function will now return [0, 1] if the Type has
coordMeta with a range property.
Copy file name to clipboardexpand all lines: releases/v0.6.0.md
+3-2
Original file line number
Diff line number
Diff line change
@@ -17,7 +17,7 @@ There is a number of breaking changes in this release, but they should only nega
17
17
As [announced](https://github.com/color-js/color.js/releases/tag/v0.5.0) in v0.5.0, we have now switched to using `null` instead of `NaN` to represent `none` values (naturally occurring when converting achromatic colors to certain color spaces).
18
18
Not only is `null` conceptually closer, but since [CSS *also* now has a `NaN` value](https://www.w3.org/TR/css-values-4/#calc-error-constants), this change allows us to represent it properly, using an actual `NaN` value.
19
19
20
-
`NaN` continues to be parsed (and becomes `NaN` in JS). Instead of being serialized to `NaN` (which is invalid in CSS), it is serialized to `calc(NaN)` which is a valid coordinate in CSS. For roundtripping to work properly, this also means we now parse `calc(NaN)` as well. Slippery slope? We’ll see. 😁
20
+
`NaN` continues to be parsed (and becomes `NaN` in JS). Instead of being serialized to `NaN` (which is invalid in CSS), it is serialized to `calc(NaN)` which is a valid coordinate in CSS. For roundtripping to work properly, this also means we now parse `calc(NaN)` as well. Slippery slope? We’ll see. 😁
21
21
22
22
If you are working with any code that needs to handle `Color` instances/objects generically, without knowing which version of Color.js they come from, you can detect which value is being used and use that instead of a hardcoded `null` or `NaN`:
23
23
@@ -84,7 +84,7 @@ If you were referencing these from their previous URL, there is a redirect in pl
84
84
85
85
## Color apps
86
86
87
-
We have now moved our [Color apps](https://apps.colorjs.io) (which also serve as Color.js demos) into their own repo and domain: https://apps.colorjs.io
87
+
We have now moved our [Color apps](https://apps.colorjs.io) (which also serve as Color.js demos) into their own repo and domain: https://apps.colorjs.io
88
88
89
89
If you have links to these, there’s nothing to worry about: the old URL still works (it just redirects to the new one).
90
90
@@ -129,6 +129,7 @@ There is also a new app:
129
129
- Do not use HSL normalized saturation and hue for certain spaces (by @facelessuser in #582)
130
130
- Avoid mutating arguments passed to the Color constructor (by @MysteryBlokHed in #603)
131
131
- Fix parsing 7-character hex colors (by @kleinfreund in #616)
132
+
- Fix parsing of percentage values for color spaces with coords that have a range property with a minimum value less than 0 (e.g. acescc) (by @lloydk in #619)
0 commit comments