Skip to content

Commit 7a294dd

Browse files
committed
Couple more fixes
1 parent 1f5fca3 commit 7a294dd

10 files changed

Lines changed: 17 additions & 12 deletions

File tree

coloraide/__meta__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,5 +204,5 @@ def parse_version(ver: str) -> Version:
204204
return Version(major, minor, micro, release, pre, post, dev)
205205

206206

207-
__version_info__ = Version(8, 0, 1, "final")
207+
__version_info__ = Version(8, 0, 2, "final")
208208
__version__ = __version_info__._get_canonical()

coloraide/gamut/fit_minde_chroma.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ def fit(
6464
polar = color.CS_MAP[pspace].is_polar()
6565
orig = color.space()
6666
mapcolor = color.convert(pspace, norm=False) if orig != pspace else color.clone().normalize(nans=False)
67-
gamutcolor = color.convert(space, norm=False) if orig != space else color.clone().normalize(nans=False)
67+
gamutcolor = mapcolor.convert(space, norm=False)
6868
if polar:
6969
l, c, h = mapcolor._space.indexes()
7070
else:
@@ -103,7 +103,7 @@ def fit(
103103
clip_channels(gamutcolor)
104104

105105
# Adjust chroma if we are not under the JND yet.
106-
if not jnd or mapcolor.delta_e(gamutcolor, **de_options) >= jnd:
106+
if not jnd or mapcolor.delta_e(gamutcolor, **de_options) > jnd:
107107
# Perform "in gamut" checks until we know our lower bound is no longer in gamut.
108108
lower_in_gamut = True
109109

coloraide/gamut/fit_raytrace.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ def raytrace_box(
176176
bx = bmax[i]
177177

178178
# Non parallel case
179-
if abs(d) > 1e-15:
179+
if abs(d) > 1e-14:
180180
inv_d = 1.0 / d
181181
t1 = (bn - a) * inv_d
182182
t2 = (bx - a) * inv_d

docs/src/markdown/about/changelog.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@ icon: lucide/scroll-text
33
---
44
# Changelog
55

6+
## 8.0.2
7+
8+
- **FIX**: Restrict `raytrace` ray size a little more.
9+
- **FIX**: Fix a case where `minde-chroma` could process an already in gamut color.
10+
611
## 8.0.1
712

813
- **FIX**: `raytrace` should match the same flow as `minde-chroma` in respect to checking lightness and then checking

docs/src/markdown/examples/3d_models.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -962,7 +962,7 @@ <h1>ColorAide Color Space Models</h1>
962962
let colorSpaces = null
963963
let colorGamuts = null
964964
let lastModel = null
965-
let package = 'coloraide-8.0.1-py3-none-any.whl'
965+
let package = 'coloraide-8.0.2-py3-none-any.whl'
966966
const defaultSpace = 'lab'
967967
const defaultGamut = 'srgb'
968968
const exceptions = new Set(['hwb', 'ryb', 'ryb-biased'])

docs/src/markdown/examples/colorpicker.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,7 @@ <h1>ColorAide Color Picker</h1>
421421
let pyodide = null
422422
let webspace = ''
423423
let initial = 'oklab(0.69 0.13 -0.1 / 0.85)'
424-
let package = 'coloraide-8.0.1-py3-none-any.whl'
424+
let package = 'coloraide-8.0.2-py3-none-any.whl'
425425

426426
const base = `${window.location.origin}/${window.location.pathname.split('/')[1]}/playground/`
427427
package = base + package

docs/src/markdown/gamut.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -551,8 +551,8 @@ variant uses CIELCh D65 and uses ∆E~2000~ with a JND of 2. We can manually per
551551
perceptual space with `psapce`, the ∆E configuration via `de_options`, and the JND with `jnd`.
552552
553553
``` py play
554-
gma_lch = {'pspace': 'lch-d65', 'de_options': {'method': '2000'}, 'jnd': 2}
555-
gma_oklch = {'pspace': 'oklch', 'de_options': {'method': 'ok'}, 'jnd': 0.02}
554+
gma_lch = {'method': 'minde-chroma', 'pspace': 'lch-d65', 'de_options': {'method': '2000'}, 'jnd': 2}
555+
gma_oklch = {'method': 'minde-chroma', 'pspace': 'oklch', 'de_options': {'method': 'ok'}, 'jnd': 0.02}
556556
557557
Steps([c.fit('srgb', **gma_lch) for c in Color.steps(['oklch(90% 0.4 0)', 'oklch(90% 0.4 360)'], steps=100, space='oklch', hue='longer')])
558558
Steps([c.fit('srgb', **gma_oklch) for c in Color.steps(['oklch(90% 0.4 0)', 'oklch(90% 0.4 360)'], steps=100, space='oklch', hue='longer')])

docs/src/zensical.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ extra_javascript:
354354
- assets/pymdownx-extras/extra-loader-Ccztcqfq.js
355355
- https://cdn.jsdelivr.net/npm/ace-builds@1.43.0/src-min-noconflict/ace.js
356356
- https://cdn.jsdelivr.net/npm/mermaid@11.12.1/dist/mermaid.min.js
357-
- playground-config-ec067f74.js
357+
- playground-config-5fdf0c34.js
358358
- https://cdn.jsdelivr.net/pyodide/v0.29.0/full/pyodide.js
359359
- assets/coloraide-extras/extra-notebook.js
360360
- https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
var colorNotebook = {
2-
"playgroundWheels": ['micropip', 'pygments-2.19.2-py3-none-any.whl', 'coloraide-8.0.1-py3-none-any.whl'],
3-
"notebookWheels": ['pyyaml', 'markdown-3.10.1-py3-none-any.whl', 'pymdown_extensions-10.20-py3-none-any.whl', 'micropip', 'pygments-2.19.2-py3-none-any.whl', 'coloraide-8.0.1-py3-none-any.whl'],
2+
"playgroundWheels": ['micropip', 'pygments-2.19.2-py3-none-any.whl', 'coloraide-8.0.2-py3-none-any.whl'],
3+
"notebookWheels": ['pyyaml', 'markdown-3.10.1-py3-none-any.whl', 'pymdown_extensions-10.20-py3-none-any.whl', 'micropip', 'pygments-2.19.2-py3-none-any.whl', 'coloraide-8.0.2-py3-none-any.whl'],
44
"defaultPlayground": "import coloraide\ncoloraide.__version__\nColor('red')"
55
}

zensical.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ extra_javascript:
354354
- assets/pymdownx-extras/extra-loader-Ccztcqfq.js
355355
- https://cdn.jsdelivr.net/npm/ace-builds@1.43.0/src-min-noconflict/ace.js
356356
- https://cdn.jsdelivr.net/npm/mermaid@11.12.1/dist/mermaid.min.js
357-
- playground-config-ec067f74.js
357+
- playground-config-5fdf0c34.js
358358
- https://cdn.jsdelivr.net/pyodide/v0.29.0/full/pyodide.js
359359
- assets/coloraide-extras/extra-notebook-BVE52itK.js
360360
- https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js

0 commit comments

Comments
 (0)