@gawe/colors
v1.0.0
Published
color style generator
Downloads
6
Maintainers
Readme
@gawe/colors
Overview
The @gawe/colors
package is a powerful tool for manipulating colors based on predefined factors in the Gawe Design
System.
Usage
To get started with @gawe/colors
, you can install it via npm:
npm i @gawe/colors
Once installed, you can import the package into your project. This package has three main functions:
- Semantic color palette generation:
generateSemanticPalette("colorName", "hexCode")
- Shared color palette generation:
generateSharedPalette("colorName", "hexCode")
- Natural color palette generation:
generateNaturalPalette("colorName", "hexCode")
That functions return an object with the color array based on the provided color name and hex code.
Examples:
let semantic = generateSemanticPalette('primary', '#004CE5');
let shared = generateSharedPalette('danger', '#E50026');
let natural = generateNaturalPalette('natural', '#555555');
Semantic color output example:
{
"primary-1": "#f2f6fe",
"primary-2": "#d9e4fb",
"primary-3": "#b3c9f7",
"primary-4": "#8caef3",
"primary-5": "#4079ec",
"primary-6": "#004CE5",
"primary-7": "#0041c3",
"primary-8": "#003195",
"primary-9": "#002267",
"primary-10": "#001339",
"primary-11": "#000b22"
}
Contributing
If you'd like to contribute to @gawe/colors
, please fork the repository and submit a pull request. We welcome
contributions of all kinds, including bug fixes, new features, and documentation improvements.
License
The Gawe Design System and its packages are licensed under the MIT License, which can be found in the LICENSE file at the root of this repository.