1.0.3 (2025-01-03)
- Dependency + changelog updates, documentation improvements
1.0.2 (2024-11-20)
- Various dependency, changelog, and documentation updates
1.0.1 (2024-03-21)
-
chore(docs): update readme and changelog (35c8233)
indicate percent now included in non-color mixing values since v1
1.0.0 (2024-03-19)
-
feat!: simplify api, update example (38c8403)
-
feat!: make sure lighter/darker are more extreme than lightness/darkness (dfd77fe)
-
remove pre-mixed values in returned object
--- a/src/index.js +++ b/src/index.js - // colors - huehsl: `hsl(${hue}, ${saturation}%, ${lightness}%)`, - complementhsl: `hsl(${complement}, ${saturation}%, ${lightness}%)`, - analogoushsl: `hsl(${analogous}, ${saturation}%, ${lightness}%)`, - // primary hue variations by lightness - huexlighthsl: `hsl(${hue}, ${saturation}%, ${xlight}%)`, - huelighterhsl: `hsl(${hue}, ${saturation}%, ${lighter}%)`, - huemidhsl: `hsl(${hue}, ${saturation}%, ${midrange}%)`, - huelowmidhsl: `hsl(${hue}, ${saturation}%, ${lowmid}%)`, - huedarkhsl: `hsl(${hue}, ${saturation}%, ${darkness}%)`, - huedarkerhsl: `hsl(${hue}, ${saturation}%, ${darker}%)`, - // complement variations by lightness - complementxlighthsl: `hsl(${complement}, ${saturation}%, ${xlight}%)`, - complementlighterhsl: `hsl(${complement}, ${saturation}%, ${lighter}%)`, - complementmidhsl: `hsl(${complement}, ${saturation}%, ${midrange}%)`, - complementlowmidhsl: `hsl(${complement}, ${saturation}%, ${lowmid}%)`, - complementdarkhsl: `hsl(${complement}, ${saturation}%, ${darkness}%)`, - complementdarkerhsl: `hsl(${complement}, ${saturation}%, ${darker}%)`, - // analogous variations by lightness - analogousxlighthsl: `hsl(${analogous}, ${saturation}%, ${xlight}%)`, - analogouslighterhsl: `hsl(${analogous}, ${saturation}%, ${lighter}%)`, - analogousmidhsl: `hsl(${analogous}, ${saturation}%, ${midrange}%)`, - analogouslowmidhsl: `hsl(${analogous}, ${saturation}%, ${lowmid}%)`, - analogousdarkhsl: `hsl(${analogous}, ${saturation}%, ${darkness}%)`, - analogousdarkerhsl: `hsl(${analogous}, ${saturation}%, ${darker}%)`,
-
non-color mixing values now returned with percent included
--- a/src/index.js +++ b/src/index.js Seed random saturation and lightness values within acceptable parameters - const saturation = getRandomIntInclusive(80, 100); + const saturation = `${getRandomIntInclusive(80, 100)}%`; // highlight - const xlight = getRandomIntInclusive(84, 92); + const xlight = `${getRandomIntInclusive(84, 92)}%`; // more extreme lightness - const lighter = getRandomIntInclusive(76, 84); + const lighter = `${getRandomIntInclusive(76, 84)}%`; // very light or white text - const lightness = getRandomIntInclusive(64, 72); + const lightness = `${getRandomIntInclusive(64, 72)}%`; // mid value used for lightness and saturation - const midrange = getRandomIntInclusive(48, 64); + const midrange = `${getRandomIntInclusive(48, 64)}%`; // dark highlight - const lowmid = getRandomIntInclusive(28, 36); + const lowmid = `${getRandomIntInclusive(28, 36)}%`; // very dark or black text - const darkness = getRandomIntInclusive(16, 24); + const darkness = `${getRandomIntInclusive(16, 24)}%`; // more extreme darkness - const darker = getRandomIntInclusive(0, 12); + const darker = `${getRandomIntInclusive(0, 12)}%`;
EXAMPLE + README CHANGES:
- only mix w css vars, vastly reducing api churn
- account for breaking api changes: see /examples/browser/index.html
- example interface overhaul/redesign, thanks @laramiedennis π
- external img: https://o.famebot.com/file/famebot/chromagen.png
0.9.0 (2023-10-16)
- add missing color values, rename some scheme values (11de0e4)
- renamed color scheme values
β οΈ
darkhuehsl
=>huehsldark
darkhuehsldarker
=>huehsldarker
darkhuehsllowmid
=>huehsllowmid
New color scheme values π
complementhslxlight
complementhsllighter
complementhsllowmid
analogoushslxlight
analogoushsllighter
analogoushsllowmid
0.8.0 (2023-10-16)
- update pkg json repository format, lockfile, publish settings, examples
0.7.0 (2023-10-15)
- rename chromagen (7efc2e3)
0.6.0 (2023-04-09)
0.5.1 (2023-04-09)
0.5.0 (2023-04-09)
- xlight, midrange, lowmid, swatch palette (5b628a8)
- Deprecated huehslactive, huehslhover, huehslmuted, darkhuehslactive, darkhuehslhover, and darkhuehslmuted
π² All mixing values now randomly generated πΎ
- General reordering and organization of
src/index.js
- mega update to
examples/browser-umd/index.html
- now shows swatch palette and supports copying values
New raw mixing values
xlight
: 84-92midrange
: 48-64lowmid
: 28-36
Usage
midrange
used foranalhslmid
andcomphslmid
lightness
DEPRECATED color scheme values
Goodbye
huehslactive
huehslhover
huehslmuted
darkhuehslactive
darkhuehslhover
darkhuehslmuted
Hello huehslxlight
and darkhuehsllowmid
huehslxlight
Replaces huehslactive
and huehslhover
xlight
for lightnessmidrange
for saturation?
darkhuehsllowmid
Replaces darkhuehslactive
and darkhuehslhover
- lowmid for lightness
0.4.0 (2023-04-06)
- use darker instead of darkness for (anal|comp)hsltext (19ea482)
0.3.5 (2023-04-06)
- add analhsltext and comphsltext using darkness (9177436)
0.3.4 (2023-04-05)
- use fn instead of reloading page in UMD example (e9c423c)
0.3.3 (2023-04-03)
- UMD color contrast (112ede0)
0.3.2 (2023-04-03)
- use
latest
everywhere; UMD color contrast; devtools links (30ce0fa)
0.3.1 (2023-04-03)
- use raw hue in UMD example (2541ce1)
0.3.0 (2023-04-03)
- add raw values to returned object to expand customization possibilities (c9b9b23)
0.2.2 (2023-04-01)
- add noop build script for umd example hosting (8c54b52)
0.2.1 (2023-03-24)
- standardize on
hslGen
notHSLgen
for UMD compat (b2b1f17)
0.2.0 (2023-03-24)
- provide CLS and UMD bundles via Microbundle (5a39ee6)
0.1.3 (2023-03-17)
0.1.2 (2023-03-17)
0.1.1 (2023-03-17)
0.1.0 (2023-03-17)
0.0.9 (2023-03-17)
- correct devDeps (e6dedf2)
0.0.8 (2023-03-15)
- init (8aec25c)