Skip to content

feat(cli): add contrast checker to panda studio - #3664

Closed
Adebesin-Cell wants to merge 1 commit into
feat/cli-studio-cleanfrom
feat/cli-studio-contrast
Closed

feat(cli): add contrast checker to panda studio#3664
Adebesin-Cell wants to merge 1 commit into
feat/cli-studio-cleanfrom
feat/cli-studio-contrast

Conversation

@Adebesin-Cell

@Adebesin-Cell Adebesin-Cell commented Jul 17, 2026

Copy link
Copy Markdown
Collaborator

Stacked PR. Base is feat/cli-studio-clean (the studio PR, #3663), so this diff is just the contrast checker. Review #3663 first.

📝 Description

Add a contrast checker to panda studio. Pick two color tokens and see the WCAG contrast ratio with AA/AAA pass badges, so you can check a pairing without leaving the viewer.

⛳️ Current behavior (updates)

The studio viewer shows your colors, but there's no way to tell whether two of them meet contrast guidelines.

🚀 New behavior

A Contrast tool under the viewer's Playground nav. Two dropdowns pick the foreground and background from your color tokens; a live preview shows the pairing, the ratio (e.g. 4.52 : 1), and badges for AA, AA Large, AAA, and AAA Large.

Ratios are computed in the browser by rasterizing each color to a canvas pixel, so it handles any CSS color format your tokens use — including oklch, which the default preset emits.

💣 Is this a breaking change (Yes/No):

No.

📝 Additional Information

The studio stack:

Test plan:

  • pnpm --filter @pandacss/cli test
  • contrast math verified in the running viewer: #000/#fff → 21.00, oklch inputs rasterize correctly, badges flip at 3 / 4.5 / 7

@changeset-bot

changeset-bot Bot commented Jul 17, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 227f75d

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

This PR includes changesets to release 20 packages
Name Type
@pandacss/cli Patch
@pandacss/dev Patch
@pandacss/language-server Patch
@pandacss/typescript-plugin Patch
playground Patch
website Patch
@pandacss/compiler-shared Patch
@pandacss/compiler-wasm Patch
@pandacss/compiler Patch
@pandacss/config Patch
@pandacss/eslint-plugin Patch
@pandacss/mcp Patch
@pandacss/postcss Patch
@pandacss/preset-base Patch
@pandacss/preset-panda Patch
@pandacss/rollup Patch
@pandacss/transformer Patch
@pandacss/types Patch
@pandacss/vite Patch
@pandacss/webpack 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

@vercel

vercel Bot commented Jul 17, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
panda-docs Error Error Jul 18, 2026 5:11am
panda-playground Error Error Jul 18, 2026 5:11am
panda-studio Error Error Jul 18, 2026 5:11am

Request Review

@Adebesin-Cell
Adebesin-Cell force-pushed the feat/cli-studio-contrast branch from bb0b3ab to f17a2d2 Compare July 18, 2026 04:27
@Adebesin-Cell
Adebesin-Cell force-pushed the feat/cli-studio-contrast branch from f17a2d2 to 99eef4a Compare July 18, 2026 04:36
@Adebesin-Cell
Adebesin-Cell force-pushed the feat/cli-studio-contrast branch from 99eef4a to 6fbd19b Compare July 18, 2026 04:38
@Adebesin-Cell
Adebesin-Cell force-pushed the feat/cli-studio-contrast branch from 6fbd19b to 2ec5f71 Compare July 18, 2026 04:46
@Adebesin-Cell
Adebesin-Cell force-pushed the feat/cli-studio-contrast branch from 2ec5f71 to 09ff312 Compare July 18, 2026 04:56
@Adebesin-Cell

Copy link
Copy Markdown
Collaborator Author

Consolidated into #3666 — the full panda studio feature now ships as one PR.

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