- 🎨 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
To install the Colore library, use the follow command:
npm install colore-js
Alternatively, if you use Yarn:
yarn add colore-js
import { hexToRgb } from 'colore-js';
const rgb = hexToRgb('#ffffff');
console.log(rgb); // Output: rgb(255, 255, 255)
- 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
See Documentation for complete API reference.
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.
This project is licensed under the MIT License - see the LICENSE file for details.
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.