Skip to content

Commit

Permalink
docs: add docs for color variants
Browse files Browse the repository at this point in the history
  • Loading branch information
mrcaidev authored Nov 16, 2024
1 parent 0ce14e1 commit 70cf7cf
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
4 changes: 4 additions & 0 deletions docs/.vitepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ export default defineConfig({
text: "Semantic-First",
link: "/semantic-first",
},
{
text: "Color variants",
link: "/color-variants",
},
{
text: "Custom Colors",
link: "/custom-colors",
Expand Down
18 changes: 18 additions & 0 deletions docs/guide/color-variants.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Color Variants

Every Radix color comes with 3 variants:

1. **Dark variant:** Original color under dark mode.
2. **P3 variant**: Original color in DCI-P3 color space.
3. **Alpha variant:** Original color with transparency.

This plugin supports all these variants out of the box. You can use these variants by suffixing the color name with the desired variant names, namely `dark`, `p3` and `a` respectively.

For example:

- `bg-reda-1` uses the **alpha** variant of red color.
- `bg-greenp3-2` uses the **P3** variant of green color.
- `bg-bluep3a-3` uses the **P3 alpha** variant of blue color.
- `bg-yellowdarkp3a-4` uses the **dark P3 alpha** variant of yellow color.

When multiple variants are applied together, they must follow the order of `dark``p3``a`.

0 comments on commit 70cf7cf

Please sign in to comment.