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

Fix procedural examples #212

Merged
merged 1 commit into from
Jan 27, 2023
Merged

Fix procedural examples #212

merged 1 commit into from
Jan 27, 2023

Conversation

ajlende
Copy link
Contributor

@ajlende ajlende commented Aug 26, 2022

Color spaces need to be registered for parse, convert, toGamut, and serialize to work in the procedural example. I was a bit surprised that I had to register LCH for toGamut to work, but if it uses LCH by default, I suppose it can't be avoided.

Color spaces need to be registered for `parse`, `convert`, `toGamut`, and `serialize` to work. I was a bit surprised that I had to register LCH for `toGamut` to work, but if it uses LCH by default, I suppose it can't be avoided.
@LeaVerou
Copy link
Member

Hey, thanks for pointing this out! That sounds like a bug we need to fix in the code, not the documentation.

@LeaVerou
Copy link
Member

I mean, color spaces do need to be registered for parse() to work. For convert(), you can pass in a reference instead of a string. toGamut should import its own dependencies, I suspect the reason it doesn't right now is that you can choose to reduce via a different coordinate. serialize() should not need any color spaces to be registered?

@LeaVerou
Copy link
Member

So I'm inclined to merge this, and we can always tweak in the future :) Thanks!

@LeaVerou LeaVerou merged commit b8344a1 into color-js:main Jan 27, 2023
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

Successfully merging this pull request may close these issues.

2 participants