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

feat: add colorMixCMYK and colorMixLAB functions #89

Closed
wants to merge 5 commits into from

Conversation

aleclarson
Copy link
Member

@aleclarson aleclarson commented Jul 6, 2024

Tip

The owner of this PR can publish a preview release by commenting /publish in this PR. Afterwards, anyone can try it out by running pnpm add radashi@pr<PR_NUMBER>.

Summary

Introduces two color mixing functions. For a lighter solution, use colorMixCMYK at the cost of perceptual uniformity. I've also included colorMixLAB (the same color mixing that colord uses) for cases where CMYK mixing isn't good enough, but colorMixLAB requires ~70% more bytes of code (minified).

This belongs in Radashi because there isn't a lightweight TypeScript solution for CMYK/LAB color mixing currently maintained anywhere. While color mixing is mostly useful in frontend programming, I think #88 can reduce the impact on Node.js packages that would prefer not to bloat their node_modules with it.

Depends on #86 and #87.

For any code change,

  • Related documentation has been updated, if needed
  • Related tests have been added or updated, if needed
  • Related benchmarks have been added or updated, if needed

Does this PR introduce a breaking change?

No

@aleclarson aleclarson marked this pull request as draft July 7, 2024 09:00
@aleclarson aleclarson closed this Jul 9, 2024
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.

1 participant