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

steps() uses deltaEMethod inconsistently #632

Open
max-m opened this issue Jan 29, 2025 · 0 comments
Open

steps() uses deltaEMethod inconsistently #632

max-m opened this issue Jan 29, 2025 · 0 comments

Comments

@max-m
Copy link

max-m commented Jan 29, 2025

The steps() function makes four calls to deltaE(), but only one of them passes the deltaEMethod option.

let totalDelta = deltaE(c1, c2);

let ΔΕ = deltaE(cur.color, ret[i - 1].color, deltaEMethod);

maxDelta = Math.max(maxDelta, deltaE(color, prev.color), deltaE(color, cur.color));

I noticed this after calling

steps(
	{ space: sRGB, coords: from },
	{ space: sRGB, coords: to },
	{ space, steps, outputSpace: sRGB, hue, deltaEMethod: 'OK' },
)

without having the Lab color space registered first.

Is this behavior intended?

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

1 participant