1.0.3 • Published 6 months ago

harmony-color v1.0.3

Weekly downloads
-
License
MIT
Repository
github
Last release
6 months ago

Harmony Color

Harmony Color is an open-source npm package (MIT Licenses) that helps harmonize colors for your API. It takes a base color in hexadecimal format as input, and allows you to choose a color harmonization mode (such as Complementary, Triadic, Tetradic, etc.). The output will be one or more harmonized colors, also in hexadecimal format.

Features

  • Input: A base color in hexadecimal (#RRGGBB), RGB (rgb(r, g, b)), or HSL (hsl(h, s%, l%)) format.
  • Harmonization Modes:
    • Complementary: Produces a color directly opposite to the input color on the color wheel.
    • Triadic: Generates three colors evenly spaced around the color wheel.
    • Tetradic: Creates four colors forming two complementary pairs.
    • Analogous: Produces colors adjacent to the base color on the color wheel.
    • Split Complementary: Generates two colors adjacent to the complementary color.
    • Square: Produces four colors evenly spaced at 90-degree intervals.
    • Monochromatic: Creates variations of the base color by adjusting saturation and lightness.
  • Output: Harmonized colors in the format of your choice (hexadecimal, RGB, or HSL).

Installation

By following: https://www.npmjs.com/package/harmony-color

Install my-project with npm

npm install harmony-color

Importation and using

Index.js :

import { generateColorPalette } from "harmony-color"

Feature :

// Choose #3498db, generate triadic color in hex format (XXX, XXX, XXX)
const hexColor = "#3498db"; // Bleu
const newColor = generateColorPalette(hexColor, 'triadic', 'hex');
console.log(newColor)

Results :

[ 'rgb(51, 152, 219)', 'rgb(219, 51, 152)', 'rgb(152, 219, 51)' ]

License

MIT

Contributing

Contributions are always welcome!

Authors

1.0.3

6 months ago

1.0.2

6 months ago

1.0.1

6 months ago

1.0.0

6 months ago