https://github.com/srcery-colors/srcery-palette
Srcery palette tracked here, exposed as an npm package
https://github.com/srcery-colors/srcery-palette
colors colorscheme json npm-package palette srcery theme
Last synced: 4 months ago
JSON representation
Srcery palette tracked here, exposed as an npm package
- Host: GitHub
- URL: https://github.com/srcery-colors/srcery-palette
- Owner: srcery-colors
- License: mit
- Created: 2022-10-28T21:16:28.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2025-08-27T16:31:57.000Z (10 months ago)
- Last Synced: 2025-10-02T15:41:02.635Z (9 months ago)
- Topics: colors, colorscheme, json, npm-package, palette, srcery, theme
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/@srcery-colors/srcery-palette
- Size: 42 KB
- Stars: 8
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Srcery Palette
Srcery colors exposed as an [npm
package](https://www.npmjs.com/package/@srcery-colors/srcery-palette), intended
as a _single source of truth_ for the [Srcery colors](https://github.com/srcery-colors), regardless of implementation.
## Installation
Using git:
```sh
git clone https://github.com/srcery-colors/srcery-palette.git
```
Using npm:
```sh
npm i @srcery-colors/srcery-palette
```
## Usage
You can clone or download and use the `palette.json` however you like:
```sh
jq < palette.json '.primary.red.hex'
```
Or you can use the [npm package](https://www.npmjs.com/package/@srcery-colors/srcery-palette), which
exports `palette.json` as a JavaScript object:
```javascript
const palette = require("@srcery-colors/srcery-palette");
console.log(palette.primary.red.hex);
```
```mjs
import palette from "@srcery-colors/srcery-palette";
console.log(palette.primary.red.hex);
```
The package also exports CSS variables that can be imported
```css
@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.