A LCH-based theme centered around a single hue that produces nine colors eventually spaced around the color wheel at nine levels of brightness.
Find a file
2024-05-10 00:14:26 -05:00
examples refactor: expanding on the examples 2024-05-06 20:25:17 -05:00
src feat: renaming some commands plus some documentation 2024-05-10 00:06:49 -05:00
.editorconfig chore: initial commit 2024-02-18 22:06:03 -06:00
.envrc feat: generate the theme using postcss 2024-02-24 12:01:13 -06:00
.gitignore build: updating setup flake 2024-03-22 01:08:52 -05:00
.npmignore build: ignore *.tgz in node packages 2024-02-24 15:09:42 -06:00
.prettierignore build: updating setup flake 2024-03-22 01:08:52 -05:00
CODE_OF_CONDUCT.md chore: initial commit 2024-02-18 22:06:03 -06:00
DCO.md build: updating setup flake 2024-03-22 01:08:52 -05:00
flake.lock build: updating setup flake 2024-03-22 01:08:52 -05:00
flake.nix feat: generate the theme using postcss 2024-02-24 12:01:13 -06:00
Justfile chore: cleaning up some source files 2024-05-10 00:14:26 -05:00
package-lock.json feat: added some better logging 2024-05-09 23:42:38 -05:00
package.json chore: cleaning up some source files 2024-05-10 00:14:26 -05:00
postcss.config.js feat: generate the theme using postcss 2024-02-24 12:01:13 -06:00
README.md docs: renaming title of read me 2024-05-10 00:07:11 -05:00

Priduck Color Theme

A CLI for generating a tri-color theme based on a single hue and an even rotation around the color wheel.

Priduck (name is nonscense) is a color theme originally designed for Fedran where the base color is a hue (in degrees, 0-360) with with nine colors based on an even distribution around the wheel with nine-levels of brightness ranging from a near-black to a near-white.

Installation

This tool is currently not available on npmjs. To install it, modify your project's .npmrc file to include:

@priduck-color-theme:registry=https://src.mfgames.com/api/packages/priduck-color-theme/npm/

Once that is done, the CLI can be installed as a development package with npm:

npm install --only-dev @priduck/cli`

Once installed, this will produce a CLI in the node_modules/.bin folder called priduck.

Commands

"css variables [--hue HUE] [--output PATH] [--selector SELECTOR]"

Generate a CSS file using variables. The thirty colors all follow the pattern of --color-priduck-cXbY where X is a number between 0 and 9 (inclusive) and Y is the brightness (also in the range of 0 to 9, inclusive).

All of the colors are calculated based on the variable --color-priduck-hue, which is not included by default. If --hue is provided with a number between 0 and 360, then --color-priduck-hue will be set to the given color.

If --selector is included, the colors will be wrapped in a selector and slightly indented:

// priduck css variables
--color-priduck-c0b0: lch(5.0 50.0 calc(var(--color-priduck-hue) + 0));
--color-priduck-c0b1: lch(15.0 45.0 calc(var(--color-priduck-hue) + 0));
// priduck css variables --selector ":root"
:root {
  --color-priduck-c0b0: lch(5 50 calc(var(--color-priduck-hue) + 0));
  --color-priduck-c0b1: lch(15 45 calc(var(--color-priduck-hue) + 0));
}

"palette gpl --hue HUE [--output PATH] [--secondary 5] [--tertiary 8]"

Generate a GNU Imp or Inkscape file. --hue is required in this situation. This assumes up to two additional colors (secondary, and tertiary).

Both of these are numbers in the range of 0-9 with 0 being an identical color to the base hue (which is always 0).

Debugging

The CLI uses debug for logging and (relatively) minor output. The CLI will produce no output unless the DEBUG environment variable is set, such as:

export DEBUG="*"