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

How to specify color shade? #39

Open
nemanjam opened this issue Dec 5, 2023 · 1 comment
Open

How to specify color shade? #39

nemanjam opened this issue Dec 5, 2023 · 1 comment

Comments

@nemanjam
Copy link

nemanjam commented Dec 5, 2023

I can't just pass a number 1-12 after color name?

<Text color="gray-5">Count: {1000}</Text>

I must use inline styles, so Theme components are limited to a single shade if using color prop?

https://www.radix-ui.com/colors/docs/overview/usage

<Text style={{ color: 'var(--gray-8)' }}>Count: {1000}</Text>
@Divyansh0108
Copy link

To specify a color shade using the Radix UI color system, you can use the var(--color-name-N) syntax, where "color-name" is the base color name, and "N" is a number between 1 and 12 representing the shade.

<Text style={{ color: 'var(--gray-5)' }}>Count: {1000}</Text>

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

No branches or pull requests

2 participants