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

Feature: panda-preset-color-radix: add contrast color option and scale values #22

Merged
merged 2 commits into from
Oct 27, 2024

Conversation

amandaguthrie
Copy link
Owner

@amandaguthrie amandaguthrie commented Oct 27, 2024

🆕 Adds

> panda-preset-color-radix

Adds Three Color Scale Values

We've added three scale values to the standard Radix colors for ease of theming.

  • 0: Intended for white in light mode and black for dark mode.
  • 9c: The contrast color for color scale 9. A few Radix colors require dark text to meet contrast requirements. This
    makes it easier by building those contrast values into the core and semantic color scales in a consistent fashion.
    Defaults to white for all colors except for amber, yellow, mint, lime, and sky.
  • 13: Intended for black in light mode and white for dark mode.

The default black and white colors can be replaced in the preset options using the contrastColorOverrides object.

✅ Quality Checklist

> 🟢 All Pull Requests

  • Tests updated?
  • Test snapshot generation is turned off?
  • Documentation updated?
  • Changesets added/updated?
  • Checks passing (biome, prettier, Typescript, unit tests)?

> ⬆️ Version Change(s)

  • Major: Breaking changes
  • Minor: Backward-compatible feature additions
  • Patch: Backward-compatible bug fixes
  • Changesets version request matches semver definitions?
  • If major version, decisioning logic around choosing backward-incompatible changes over backward-compatible changes
    is included in changeset?

@amandaguthrie amandaguthrie merged commit 58f4948 into main Oct 27, 2024
6 checks passed
@amandaguthrie amandaguthrie deleted the feat/panda-preset-color-radix-add-contrast-colors branch October 27, 2024 19:30
@amandaguthrie amandaguthrie mentioned this pull request Oct 27, 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