@gawe/colors

1.0.0 • Public • Published

@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:

  1. Semantic color palette generation: generateSemanticPalette("colorName", "hexCode")
  2. Shared color palette generation: generateSharedPalette("colorName", "hexCode")
  3. 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.

Package Sidebar

Install

npm i @gawe/colors

Weekly Downloads

0

Version

1.0.0

License

MIT

Unpacked Size

10.4 kB

Total Files

6

Last publish

Collaborators

  • tvative