- TypeScript 82.2%
- Nix 8.9%
- Just 8.9%
|
|
||
|---|---|---|
| .config | ||
| .vscode | ||
| LICENSES | ||
| news | ||
| src | ||
| tests | ||
| .editorconfig | ||
| .envrc | ||
| .gitignore | ||
| .prettierignore | ||
| CODE_OF_CONDUCT.md | ||
| DCO.md | ||
| deno.json | ||
| deno.lock | ||
| flake.lock | ||
| flake.nix | ||
| Justfile | ||
| README.md | ||
| REUSE.toml | ||
Nine Degrees Below Palette
The Nine Degrees Below's palette in various formats.
This node package is inspired by Nine Degrees Below's LCh color palette. It repackages it in various formats to make it easier to reuse in Node-based packages. It also produces GPL palette files for use with GNU Image and Inkscape.
This defines all five saturations of the twenty-four colors.
There are also color wheels that mostly match the ones from Nine Degrees Below:
Conventions
In most cases, the hues are identified by h and a three digit, zero-padded number:
h000h024h038h053h065h080h090h100h115h130h145h162h180h204h218h233h245h260h270h280h295h310h325h342
There are five saturations at each level.
s10for 1.0 saturations08for 0.8 saturations06for 0.6 saturations04for 0.4 saturations02for 0.2 saturation
From the source file, there is a GPL file with only the 0.8 and 0.2 saturation.
The color codes are in the format of color-nine-degrees-below-h000-s08.
There are also thirteen levels of gray: g05, g10, g15, g20, g30, g40, g50, g60, g70, g80, g85, g90, g95. These go from darkest to lightest.
Locations
The cannon location for this repository is:
Mirrors are also available at:
Issues can be reported in any of the three locations (check the mirrors first).
Usage
The primary way of using this is as a Node package.
npm install --only-dev @mfgames/nine-degrees-below
Including as a style
@import "@mfgames/nine-degrees-below/styles/nine-degrees-below-oklch.css";
There are two formats for this file:
- Using
oklch():@mfgames/nine-degrees-below/styles/nine-degrees-below-oklch.css
- Using hex strings:
@mfgames/nine-degrees-below/styles/nine-degrees-below-hex.css
There is also a Sass variant changing .css to .scss.
Style Dictionary
With Style Dictionary, it can be used directly.
// build.ts
import StyleDictionary from "style-dictionary";
import { tokens } from "@mfgames/nine-degrees-below";
const style = new StyleDictionary({
source: [`src/tokens/**/*.json`],
tokens,
platforms: {},
});
Then in your token file:
{
"theme": {
"$type": "color",
"background": {
"$type": "color",
"$value": "{color.nine-degrees-below.g90}"
}
}
}
The three variable exposed by the package are:
tokensis the DTCG color token filetokensHexis a nested JS structure of hex codes, such ascolor.nine-degrees-below.h000.s10tokensOklchis the same as Hex but withoklch()CSS functions