From a7ff5a5b46fbe531f3ce06156ea2d6b4fe225d68 Mon Sep 17 00:00:00 2001 From: Mark Griffiths Date: Fri, 5 Nov 2021 13:10:40 +0000 Subject: [PATCH] Update Dependencies --- docs/index.html | 112 +++------------------------------------------ package-lock.json | 25 ---------- readme.md | 2 +- src/docs/readme.md | 2 +- 4 files changed, 8 insertions(+), 133 deletions(-) diff --git a/docs/index.html b/docs/index.html index 6d25753..6ca54d3 100644 --- a/docs/index.html +++ b/docs/index.html @@ -121,108 +121,8 @@

Installation

-
Global version, for CLI use
-
npm install --global @thebespokepixel/trucolor
-
Module, for programmatic use
npm install --save @thebespokepixel/trucolor
-

CLI Usage

-

Synopsis:

-
trucolor [options] "color description"...
-
-Options:
--h, --help     Display this help.
--v, --version  Return the current version on stdout. -vv Return name & version.
--V, --verbose  Be verbose. -VV Be loquacious.
--m, --message  Format message with SGR codes
--i, --in       Output SGR color escape code.
--o, --out      Output cancelling SGR color escape code.
--t, --type     CLI styling flags output.
--r, --rgb      Output color as rgb(r, g, b).
--s, --swatch   Output an isolated color swatch.
---color        Force color depth --color=256|16m. Disable with --no-color
-

Usage Examples

-

In it's simplest form, trucolor 'color', will take any of the color expressions listed below and transform it into a simple hexadecimal triplet string, i.e AA00BB, ideal for passing into fish-shell's set_color built-in, or providing the basis of further color processing.

-

It can return color values and set terminal colors for a wide range of color assignment declarations and manipulation functions. See the examples below.

-

When outputting SGR codes, colors will be shifted to the availalble 256 or ansi color palette if 24 bit color is unavailable or will be omitted in a monochromatic terminal to make usage across environments safe. The CLI command respects --color=16m, --color=256, --color and --no-color flags. It does not affect value based output, such as the default or --rgb output, it only effects the --in, --out, --message and --swatch outputs.

-

The motivation for this is to allow more sophisticated graphic visualisation using in modern, xterm-compatible terminal emulators that have added 24 bit support.

-
Color definition
-

The color can be defined in any of the following formats:

- -

Formatters Examples

-
Color manipulation
-

A number of color operations can be specified, either before or after the base color declaration.

-

light: lighten by 20% -dark: darken by 20% -lighten percent: lighten by percent -darken percent: darken by percent -mono: make monochrome -saturate or sat percent: saturate by percent -desaturate or des percent: desaturate by percent -spin degrees: spin hue by by degrees -color mix color: mix colors

-
Multiple Inputs
-

trucolor will output a list of color values if more than one base color is specified, allowing color assignment in a single block allowing easy ingest using read. Each color will be output on it's own line, and named according to the input base color. The names can be overridden by providing a name: before the base color.

-
> trucolor red yellow green purple
-red: ff0000
-yellow: ffff00
-green: 008000
-purple: 800080
-
-> trucolor Po: red LaaLaa: yellow Dipsy: green TinkyWinky: purple
-Po: ff0000
-LaaLaa: ffff00
-Dipsy: 008000
-TinkyWinky: 800080
-
-> trucolor hsl:120,100,50 apples: orange spin 180
-hsl-120-100-50: 00ff00
-apples: 005aff
-

Programmatic Usage

+

Usage

 import {trucolor, palette, chalkish, simple} from 'trucolor'
 
@@ -278,7 +178,7 @@ 

- + src/index.js @@ -393,7 +293,7 @@

- + src/index.js @@ -479,7 +379,7 @@

- + src/index.js @@ -564,7 +464,7 @@

- + src/index.js @@ -640,7 +540,7 @@

- + src/index.js diff --git a/package-lock.json b/package-lock.json index cf9f1b0..1d8d839 100644 --- a/package-lock.json +++ b/package-lock.json @@ -24,12 +24,8 @@ "verbosity": "^3.0.2", "yargs": "^17.2.1" }, - "bin": { - "trucolor": "bin/trucolor" - }, "devDependencies": { "@rollup/plugin-commonjs": "^21.0.1", - "@rollup/plugin-json": "^4.1.0", "@rollup/plugin-node-resolve": "^13.0.6", "@types/estree": "^0.0.50", "ava": "^4.0.0-rc.1", @@ -705,18 +701,6 @@ "rollup": "^2.38.3" } }, - "node_modules/@rollup/plugin-json": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/@rollup/plugin-json/-/plugin-json-4.1.0.tgz", - "integrity": "sha512-yfLbTdNS6amI/2OpmbiBoW12vngr5NW2jCJVZSBEz+H5KfUJZ2M7sDjk0U6GOOdCWFVScShte29o9NezJ53TPw==", - "dev": true, - "dependencies": { - "@rollup/pluginutils": "^3.0.8" - }, - "peerDependencies": { - "rollup": "^1.20.0 || ^2.0.0" - } - }, "node_modules/@rollup/plugin-node-resolve": { "version": "13.0.6", "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-13.0.6.tgz", @@ -20821,15 +20805,6 @@ "resolve": "^1.17.0" } }, - "@rollup/plugin-json": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/@rollup/plugin-json/-/plugin-json-4.1.0.tgz", - "integrity": "sha512-yfLbTdNS6amI/2OpmbiBoW12vngr5NW2jCJVZSBEz+H5KfUJZ2M7sDjk0U6GOOdCWFVScShte29o9NezJ53TPw==", - "dev": true, - "requires": { - "@rollup/pluginutils": "^3.0.8" - } - }, "@rollup/plugin-node-resolve": { "version": "13.0.6", "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-13.0.6.tgz", diff --git a/readme.md b/readme.md index 3ea1cb2..18c99aa 100644 --- a/readme.md +++ b/readme.md @@ -64,6 +64,6 @@ See [es-tinycolour][3] for complete colour input syntax. Full documentation can be found at [https://thebespokepixel.github.io/trucolor/][1] [1]: https://thebespokepixel.github.io/trucolor/ -[2]: https://github.com/thebespokepixel/truwrap-cli +[2]: https://github.com/thebespokepixel/trucolor-cli [3]: https://github.com/thebespokepixel/es-tinycolor [logo]: https://raw.githubusercontent.com/thebespokepixel/trucolor/master/media/banner.png diff --git a/src/docs/readme.md b/src/docs/readme.md index 1ec8f39..a8679c2 100644 --- a/src/docs/readme.md +++ b/src/docs/readme.md @@ -15,6 +15,6 @@ See [es-tinycolour][3] for complete colour input syntax. Full documentation can be found at [https://thebespokepixel.github.io/trucolor/][1] [1]: https://thebespokepixel.github.io/trucolor/ -[2]: https://github.com/thebespokepixel/truwrap-cli +[2]: https://github.com/thebespokepixel/trucolor-cli [3]: https://github.com/thebespokepixel/es-tinycolor [logo]: https://raw.githubusercontent.com/thebespokepixel/trucolor/master/media/banner.png