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

Do we need Color.convert()? #153

Closed
LeaVerou opened this issue Jun 23, 2022 · 0 comments
Closed

Do we need Color.convert()? #153

LeaVerou opened this issue Jun 23, 2022 · 0 comments

Comments

@LeaVerou
Copy link
Member

LeaVerou commented Jun 23, 2022

Right now we have a Color.convert(coords, fromSpace, toSpace) method for converting coords between color spaces without creating Color objects.

However, this is now pretty easy to do already via ColorSpace.get(fromSpace).to(toSpace, coords).coords and trivial if you have a color object: color.to(toSpace).coords. After the recent refactoring it's not used anywhere internally.
Not sure we should be optimizing our API for conversions of arrays of coords. We don't have other convenience methods like that (e.g. to gamut map an array of coords).
I vote for removing this method.

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

No branches or pull requests

1 participant