Skip to content

Advanced, High-Performance JavaScript Library for Color Conversions, Color Manipulations, Color Analysis, Color Harmony, Color Blending.

License

Notifications You must be signed in to change notification settings

mallikcheripally/colore-js

Repository files navigation


An Advanced, High-Performance JavaScript Library for Color Conversions, Color Manipulations, Color Analysis, Color Harmony, Color Blending.

Features

  • 🎨 Color Conversions: Supports a wide range of color conversions including RGB, RGBA, HEX, HEX Alpha, HSL, HSLA, LAB, LCH, XYZ, and more.
  • 🔄 Color Manipulations: Easily manipulate colors with functions to lighten, darken, saturate, desaturate, invert, and blend colors.
  • 📊 Color Analysis: Calculate contrast ratios, luminance, and other color metrics for accessibility.
  • 🌈 Color Harmony: Generate complementary, triadic, tetradic, analogous, and monochromatic color schemes.
  • 🛠️ Utility Functions: A set of utility functions for common color operations, including color parsing and recomposition.
  • 🔍 Validations: Validate color formats to ensure correct color values before applying transformations.
  • 🚀 High Performance: Optimized for performance with a small footprint.
  • No Dependencies: Designed to be lean and efficient without any external dependencies.
  • 📦 Small Size: 10 KB gzipped

Installation

To install the Colore library, use the follow command:

npm install colore-js

Alternatively, if you use Yarn:

yarn add colore-js

Getting Started

import { hexToRgb } from 'colore-js';

const rgb = hexToRgb('#ffffff');
console.log(rgb); // Output: rgb(255, 255, 255)

Supported Color Formats

  • Hex strings
  • Hex Alpha strings
  • HSL strings and objects
  • HSV strings and objects
  • LAB strings and objects
  • LCH strings and objects
  • Named Colors strings and objects
  • RGB strings and objects
  • RGBA strings and objects
  • XYZ strings and objects

API Reference

See Documentation for complete API reference.

Contributing

We welcome contributions from the community to make Colore better. If you find any issues or have suggestions for improvements, feel free to contribute or open an issue on our GitHub Repository.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Something Missing?

If you find any issues or have suggestions for improvements, feel free to contribute or open an issue on our GitHub Repository. We welcome contributions from the community to make Colore better.