@srcery-colors/srcery-palette

1.1.0 • Public • Published

Srcery Palette

Srcery colors exposed as an npm package, intended as a single source of truth for the Srcery colors, regardless of implementation.

Installation

Using git:

git clone https://github.com/srcery-colors/srcery-palette.git

Using npm:

npm i @srcery-colors/srcery-palette

Usage

You can clone or download and use the palette.json however you like:

jq < palette.json '.primary.red.hex'

Or you can use the npm package, which exports palette.json as a JavaScript object:

const palette = require("@srcery-colors/srcery-palette");
console.log(palette.primary.red.hex);
import palette from "@srcery-colors/srcery-palette";
console.log(palette.primary.red.hex);

The package also exports CSS variables that can be imported

@import "@srcery-colors/srcery-palette";
background: var(--srcery-palette-primary-black);

See palette.json for a full list of variable names, but it follows the same structure as demonstrated.

Readme

Keywords

none

Package Sidebar

Install

npm i @srcery-colors/srcery-palette

Homepage

srcery.sh

Weekly Downloads

8

Version

1.1.0

License

MIT

Unpacked Size

13.6 kB

Total Files

6

Last publish

Collaborators

  • roosta42