color-value-tools 1.1.10 → 1.1.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +31 -0
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -80,6 +80,37 @@ CommonJS:
80
80
  const { normalizeColor, mixColors } = require('color-value-tools')
81
81
  ```
82
82
 
83
+ ### More examples
84
+
85
+ #### What your palette looks like to a colorblind user
86
+
87
+ `simulateColorBlindness` applies the Vienot 1999 matrices to linearized RGB — you can check contrast before shipping, not guess from a checklist.
88
+
89
+ ```ts
90
+ import { simulateColorBlindness } from 'color-value-tools'
91
+
92
+ simulateColorBlindness('#e74c3c', 'deuteranopia') // '#9a7b00'
93
+ simulateColorBlindness('#3498db', 'protanopia') // '#5282db'
94
+
95
+ // Vienot 1999 matrices applied to linearized RGB — good enough to check a
96
+ // palette before it ships, not just guess from a colorblind-safe checklist.
97
+ ```
98
+
99
+ #### A harmony and a shade scale from one color
100
+
101
+ `triadic` builds three colors 120° apart, `colorShades` a light-to-dark scale of nine steps. One base color in, a coordinated palette out — no manual hue math, no hand-picked hex values.
102
+
103
+ ```ts
104
+ import { triadic, colorShades } from 'color-value-tools'
105
+
106
+ triadic('#6c3483') // ['#6c3483', '#34836c', '#83346c'] — evenly spaced 120°
107
+
108
+ const shades = colorShades('#6c3483', 9) // light-to-dark HSL scale, 9 steps
109
+
110
+ // One base color in, a coordinated palette out — no manual hue-rotation
111
+ // math, no hand-picked hex values.
112
+ ```
113
+
83
114
  ---
84
115
 
85
116
  ## Documentation & links
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "color-value-tools",
3
- "version": "1.1.10",
3
+ "version": "1.1.11",
4
4
  "description": "Parse, convert and manipulate colors across hex, RGB, HSL, Lab, LCH, OKLCH and CMYK, with WCAG contrast checks and CSS variables. Zero dependencies.",
5
5
  "author": "macrulez <macrulezru@gmail.com> (https://macrulez.ru/en)",
6
6
  "license": "MIT",