Skip to content

Commit

Permalink
Add script for colors package
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielleHuisman committed May 8, 2024
1 parent 77dee1a commit 26f2c89
Show file tree
Hide file tree
Showing 11 changed files with 3,317 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
[workspace]
members = ["packages/primitives/*/*", "packages/primitives/*/*/example"]
members = [
"packages/colors",
"packages/primitives/*/*",
"packages/primitives/*/*/example",
"scripts",
]
resolver = "2"

[workspace.package]
Expand Down
9 changes: 9 additions & 0 deletions packages/colors/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[package]
name = "radix-colors"
description = "Rust port of Radix Colors."

authors.workspace = true
edition.workspace = true
license.workspace = true
repository.workspace = true
version.workspace = true
13 changes: 13 additions & 0 deletions packages/colors/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<p align="center">
<a href="../../logo.svg" alt="Rust Radix logo">
<img src="../../logo.svg" width="300" height="200">
</a>
</p>

<h1 align="center">radix-colors</h1>

A gorgeous, accessible color system.

## Rust Radix

[Rust Radix](https://github.com/NixySoftware/radix) is a Rust port of [Radix](https://www.radix-ui.com/colors).
29 changes: 29 additions & 0 deletions packages/colors/src/black_a.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
pub const BLACK_A: [&str; 12] = [
"rgba(0, 0, 0, 0.05)",
"rgba(0, 0, 0, 0.1)",
"rgba(0, 0, 0, 0.15)",
"rgba(0, 0, 0, 0.2)",
"rgba(0, 0, 0, 0.3)",
"rgba(0, 0, 0, 0.4)",
"rgba(0, 0, 0, 0.5)",
"rgba(0, 0, 0, 0.6)",
"rgba(0, 0, 0, 0.7)",
"rgba(0, 0, 0, 0.8)",
"rgba(0, 0, 0, 0.9)",
"rgba(0, 0, 0, 0.95)",
];

pub const BLACK_P3_A: [&str; 12] = [
"color(display-p3 0 0 0 / 0.05)",
"color(display-p3 0 0 0 / 0.1)",
"color(display-p3 0 0 0 / 0.15)",
"color(display-p3 0 0 0 / 0.2)",
"color(display-p3 0 0 0 / 0.3)",
"color(display-p3 0 0 0 / 0.4)",
"color(display-p3 0 0 0 / 0.5)",
"color(display-p3 0 0 0 / 0.6)",
"color(display-p3 0 0 0 / 0.7)",
"color(display-p3 0 0 0 / 0.8)",
"color(display-p3 0 0 0 / 0.9)",
"color(display-p3 0 0 0 / 0.95)",
];
Loading

0 comments on commit 26f2c89

Please sign in to comment.