https://github.com/rumkin/stylex
Color palette as dependency
https://github.com/rumkin/stylex
colors css palette
Last synced: 2 months ago
JSON representation
Color palette as dependency
- Host: GitHub
- URL: https://github.com/rumkin/stylex
- Owner: rumkin
- License: mit
- Created: 2019-11-29T02:25:55.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2021-08-11T18:07:38.000Z (almost 5 years ago)
- Last Synced: 2025-03-18T06:30:10.479Z (about 1 year ago)
- Topics: colors, css, palette
- Language: JavaScript
- Homepage: https://rumkin.github.io/stylex/
- Size: 80.1 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: readme.md
- License: license
Awesome Lists containing this project
README
# Stylex Colors
Versionable colors for your web app as dependency.
This package contains colors for stylex design system. It presented
as CSS, ESM, JSON and UMD. HSL model is used for color values due
to its human and computation friendliness.
## Install
```bash
npm i @stylex/colors
```
## Usage
CSS:
```html
html {
background-color: var(--violet-90);
color: var(--pink-40);
}
```
### JS
Node.JS:
```js
import {red, silver} from '@stylex/colors'
red[50] // -> [0, 80, 50]
silver[90] // -> [200, 5, 90]
```
Browser ESM:
```html
import {red, green, blue} from 'https://unpkg.com/@styles/colors@v1.3/colors.js'
```
Browser UMD:
```html
```
## Colors
Each color has shades from 5 to 95. Each shade presented as index of lightness.
CSS names format is `--${COLOR}-${SHADE}`.
Colors:
* red
* orange
* yellow
* green
* teal
* blue
* violet
* purple
* pink
* silver
* gray
* rusty
## License
MIT © [Rumkin](https://rumk.in)