Skip to content

Conversation

@drwpow
Copy link
Collaborator

@drwpow drwpow commented May 9, 2025

Changes

Fixes #464. Preserves originally-authored colorspace when downsampling to sRGB, etc.

This was never intentional behavior, merely a side effect of Culori’s toGamut() API which converts to the lowest-common-denominator color space to ensure it’s valid in that space.

Technically when converting back, we introduce the very very very tiny possibility a rounding error occurred. But since we’re using Culori, the “lossiness” of such color operations should always be so infinitesimally small, any rounding error shouldn’t have any impact in even the most extreme scenarios._

How to Review

  • Tests updated; review test snapshots!

@changeset-bot
Copy link

changeset-bot bot commented May 9, 2025

🦋 Changeset detected

Latest commit: b3399b0

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 12 packages
Name Type
@terrazzo/token-tools Patch
@terrazzo/cli Patch
@terrazzo/parser Patch
@terrazzo/plugin-css Patch
@terrazzo/plugin-js Patch
@terrazzo/plugin-sass Patch
@terrazzo/plugin-swift Patch
@terrazzo/plugin-tailwind Patch
@terrazzo/token-lab Patch
@terrazzo/use-color Patch
@terrazzo/react-color-picker Patch
@terrazzo/tiles Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@drwpow drwpow force-pushed the css-downsample branch from 476eef0 to b3399b0 Compare May 9, 2025 04:37
@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented May 9, 2025

Deploying terrazzo with  Cloudflare Pages  Cloudflare Pages

Latest commit: b3399b0
Status: ✅  Deploy successful!
Preview URL: https://3e59e4fb.terrazzo.pages.dev
Branch Preview URL: https://css-downsample.terrazzo.pages.dev

View logs

@drwpow drwpow merged commit 2c28957 into main May 9, 2025
9 checks passed
@drwpow drwpow deleted the css-downsample branch May 9, 2025 04:40
@github-actions github-actions bot mentioned this pull request May 9, 2025
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.

White defined in oklch is emitted in srgb, rec2020, and p3

2 participants