EON is a carefully curated color palette inspired by natural elements and timeless design principles for modern interface designs. It features 28 carefully selected colors organized into 7 semantic groups.
For more detailed documentation, visit the NPM Package repository or the GitHub repository.
Click this link to see the color swatches .
π¦ Installation & Usage
bash
1
2
# npm
npm install @logstack/eon
javascript
1
2
3
4
5
6
7
8
9
import { EonColors , getEonColor } from '@logstack/eon' ;
// Direct access
const black = EonColors . black ; // "#000000"
const teal = EonColors . teal ; // "#2a9d8f"
// Function access with validation
const color = getEonColor ( 'coral' ); // "#e76f51"
const invalid = getEonColor ( 'red' ); // null
eon.js
1
2
3
4
5
6
7
8
import { EonGroups , getEonGroup } from '@logstack/eon' ;
// Get entire color groups
const darkColors = EonGroups . deepAnchors ;
// { black: "#000000", pitch: "#090909", night: "#121212", coal: "#2b2b2b" }
const accents = getEonGroup ( 'vibrantAccents' );
// { coral: "#e76f51", terra: "#d65a3a", mustard: "#ffde5c", teal: "#2a9d8f" }
inject.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
import { injectEonColors , removeEonColors } from '@logstack/eon/inject' ;
// Inject CSS custom properties
injectEonColors ();
// Creates :root { --eo-black: #000000; --eo-teal: #2a9d8f; ... }
// Custom configuration
injectEonColors ({
styleId : 'my-colors' , // Custom style element ID
replace : false // Don't replace existing styles
});
// React component example
function Button () {
return (
< button style = {{
color : 'var(--eo-white)' ,
backgroundColor : 'var(--eo-coral)'
}} >
Click Me
< /button>
);
}
// Remove injected styles
removeEonColors ();
eon.css
1
2
3
4
5
6
@ import '@logstack/eon/dist/eon.css' ;
button {
background : var ( -- eo - sigil );
border : 2 px solid var ( -- eo - coal );
}
eon.scss
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
/*
@mixin eon-colors($selector: ':root') {} // Generate CSS variables
@function eon-color($colorName) {} // Returns CSS styled variable, Eg: var(--eo-sigil)
@function eon-color-value($colorName) {} // Returns Hex value of color, Eg: #4D4153
@function eon-color-group($groupName) {} // Returns an array of colors values from specified group.
*/
@use 'sass:color' ;
@use '@logstack/eon/dist/eon' as eon ;
@include eon . eon-colors ();
.button {
background : eon . eon-color ( 'teal' ); //? var(--eo-teal);
border : 2 px solid eon . eon-color-value ( 'coal' ); //? #2B2B2B
& :hover {
background : color . scale ( eon . eon-color-value ( 'teal' ) , $green : 44 % );
}
}
@use 'sass:map' ;
.tmp {
color : map . get ( $eon-color-palette , 'sigil' );
}
eon.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import {
getAllColorNames ,
getAllGroupNames ,
getColorsByGroup ,
isValidEonColor
} from '@logstack/eon' ;
const allColors = getAllColorNames ();
// ['black', 'pitch', 'night', ...]
const groups = getAllGroupNames ();
// ['deepAnchors', 'stoneNeutrals', ...]
const earthyColors = getColorsByGroup ( 'earthyTones' );
// ['olive', 'khaki', 'moss', 'taupe', 'latte']
const isEonColor = isValidEonColor ( '#2a9d8f' ); // true
eon.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
{
"version" : "1.0.0" ,
"colors" : {
"black" : "#000000" ,
"pitch" : "#090909" ,
// ...
},
"groups" : {
"deepAnchors" : {
"black" : "#000000" ,
"pitch" : "#090909" ,
// ...
}
// ...
}
}
π API Reference
javascript
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// Core functions
getEonColor ( colorName : string ) : string | null
getEonGroup ( groupName : string ) : Record < string , string > | null
getAllColorNames () : string []
getAllGroupNames () : string []
getColorsByGroup ( groupName : string ) : string [] | []
isValidEonColor ( colorName : string ) : boolean
isEonColorsInjected ( styleId : string ) : boolean
removeEonColors ( styleId : string ) : boolean ; // Removes CSS variables
injectEonColors ( options : Record < string , string > ) : boolean ; // Injects CSS variables
// Core objects
EonColors : Record < string , string >
EonGroups : Record < string , Record < string , string >>
π¨ Color Palette & Groups List
Deep Anchors :
Color : black, pitch, night, coal
Usage : Text, dark backgrounds
Stone Neutrals :
Color : graphite, storm, steel
Usage : Borders, disabled states
Earthy Tones :
Color : olive, khaki, moss, taupe, latte
Usage : Natural UI elements
Dusty Chromatics :
Usage : plum, mauve
Usage : Secondary accents
Soft Neutrals :
Color : cream, sand, smoke, powder, white
Usage : Backgrounds, light surfaces
Ethereal Pastels :
Color : mint, petal, blush, candy, peach
Usage : Highlights, delicate accents
Vibrant Accents :
Color : coral, terra, mustard, teal
Usage : CTAs, important elements
Full Color Reference
π€ Contributing
Check out this guide link
Also makesure to record your changes in the changelog file.
π License
MIT License Β© 2025 Logstack Labs . See LICENSE for details.
π Acknowledgements
EON was made possible with help from:
βοΈ
Quote
βColors are the smiles of nature.β - Leigh Hunt