An open API service indexing awesome lists of open source software.

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

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)