包详细信息

colore-js

mallikcheripally2.5kMIT1.4.2

A JS library for Color Conversions, Manipulations, Harmony Generations, Accessibility Analysis and Parsing.

color, manipulation, conversion, javascript

自述文件


A High-Performance JavaScript Library for Color Management.

Features

🔄 Color Manipulations

       Easily manipulate colors with functions to lighten, darken, saturate, desaturate, invert, and blend colors.

🌈 Color Harmony

       Generate harmonious colors using monochromatic, complementary, triadic, tetradic, and more color schemes.

🔍 Color Validation

       Validate color formats to ensure correct color values before applying transformations.

🎨 Color Conversions

       Convert colors between all popular color formats such as RGB, HEX, HSL, LAB, LCH, and more.

📊 Accessibility

       Calculate contrast ratios, luminance, and other color metrics for accessibility.

🛠 Color Parsing

       Parse individual components of colors, decompose and recompose colors.

🚀 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, lightenColor, saturateColor, setCssVariableValue } from 'colore-js';

// Lightening a color
const lightenedRgb = lightenColor('rgb(255, 0, 0)', 20);
console.log(lightenedRgb); // Output: 'rgb(255, 51, 51)'

// Saturating a color
const saturatedRgb = saturateColor('rgb(255, 0, 0)', 50);
console.log(saturatedRgb); // Output: 'rgb(255, 51, 51)'

// Converting HEX to RGB color format
const rgbString = hexToRgb('#ff5733');
console.log(rgbString); // Output: 'rgb(255, 87, 51)'

// Setting a new CSS Variable Value
const element = document.querySelector('.my-element');
setCssVariableValue(element, '--my-variable', 'blue');

API Reference

Analysis

<summary>getContrastRatio</summary> javascript import { getContrastRatio } from 'colore-js'; const result = getContrastRatio('#ffffff', '#000000'); console.log(result); // Output: { ratio: 21, ratioString: "21.00:1", isAccessible: true, level: 'AAA' }
<summary>getLuminance</summary> javascript import { getLuminance } from 'colore-js'; const luminance = getLuminance('#ffffff'); console.log(luminance); // Output: 1

Conversions

<summary>cmykToRgb</summary> javascript import { cmykToRgb } from 'colore-js'; const rgbString = cmykToRgb(0, 100, 100, 0); console.log(rgbString); // Output: "rgb(255, 0, 0)"
<summary>hexAlphaToHsla</summary> javascript import { hexAlphaToHsla } from 'colore-js'; const hslaColor = hexAlphaToHsla('#ff5733cc'); console.log(hslaColor); // Output: "hsla(14, 100%, 60%, 0.8)"
<summary>hexAlphaToHsva</summary> javascript import { hexAlphaToHsva } from 'colore-js'; const hsvaString = hexAlphaToHsva('#ff5733cc'); console.log(hsvaString); // Output: "hsva(11, 0.8, 1, 0.8)"
<summary>hexAlphaToRgba</summary> javascript import { hexAlphaToRgba } from 'colore-js'; const rgbaString = hexAlphaToRgba('#FF5733CC'); console.log(rgbaString); // Output: "rgba(255, 87, 51, 0.8)"
<summary>hexToHexAlpha</summary> javascript import { hexToHexAlpha } from 'colore-js'; const hexWithAlpha = hexToHexAlpha('#ff0000', 0.5); console.log(hexWithAlpha); // Output: '#ff000080'

See all Conversions.

### CSS Variables
<summary>getCssVariableValue</summary> javascript import { getCssVariableValue } from 'colore-js'; const element = document.querySelector('.my-element'); const variableValue = getCssVariableValue(element, '--my-variable'); console.log(variableValue); // Output: 'your-css-variable-value'
<summary>setCssVariableValue</summary> javascript import { setCssVariableValue } from 'colore-js'; const element = document.querySelector('.my-element'); setCssVariableValue(element, '--my-variable', 'blue');

Generators

<summary>generateInterpolatedColors</summary> javascript import { generateInterpolatedColors } from 'colore-js'; const color1 = '#ff0000'; const color2 = '#00ff00'; const steps = 5; const interpolatedColorsStrings = generateInterpolatedColors(color1, color2, steps); console.log(interpolatedColorsStrings);
<summary>generateRandomColor</summary> javascript import { generateRandomColor, ColorFormats } from 'colore-js'; const randomHexColor = generateRandomColor(ColorFormats.HEX); console.log(randomHexColor); // Output: "#a1b2c3" (example)

Harmony

<summary>analogousColors</summary> javascript import { analogousColors } from 'colore-js'; const analogous = analogousColors('#ff0000'); console.log(analogous); // Output: ['#ff8000', '#ff0080']
<summary>complementaryColor</summary> javascript import { complementaryColor } from 'colore-js'; const complementary = complementaryColor('#ff0000'); console.log(complementary); // Output: '#00ffff'
<summary>monochromaticColors</summary> javascript import { monochromaticColors } from 'colore-js'; const monochromatic = monochromaticColors('#ff0000'); console.log(monochromatic); // Output: ['#4c0000', '#b20000', '#ff0000', '#ff4c4c', '#ff9999']
<summary>tetradicColors</summary> javascript import { tetradicColors } from 'colore-js'; const tetradic = tetradicColors('#ff0000'); console.log(tetradic); // Output: ['#00ff00', '#0000ff', '#ff00ff']
<summary>triadicColors</summary> javascript import { triadicColors } from 'colore-js'; const triadic = triadicColors('#ff0000'); console.log(triadic); // Output: ['#00ff00', '#0000ff']

Manipulations

<summary>blendColors</summary> javascript import { blendColors, BlendingModes } from 'colore-js'; const blended = blendColors('#ff0000', '#0000ff', BlendingModes.MULTIPLY); console.log(blended); // Output: '#000000'
<summary>darkenColor</summary> javascript import { darkenColor } from 'colore-js'; const darkened = darkenColor('#ff0000', 20); console.log(darkened); // Output: '#cc0000'
<summary>desaturateColor</summary> javascript import { desaturateColor } from 'colore-js'; const desaturated = desaturateColor('#ff0000', 50); console.log(desaturated); // Output: '#804040'
<summary>invertColor</summary> javascript import { invertColor } from 'colore-js'; const invertedColor = invertColor("#ff5733"); console.log(invertedColor); // Output: "#00a8cc"
<summary>lightenColor</summary> javascript import { lightenColor } from 'colore-js'; const lightened = lightenColor('#ff0000', 20); console.log(lightened); // Output: '#ff6666'

See all Manipulations.

Parser

<summary>decomposeColor</summary> javascript import { decomposeColor } from 'colore-js'; const decomposedHex = decomposeColor('#ff0000'); console.log(decomposedHex); // Output: { r: 255, g: 0, b: 0 }
<summary>detectColorFormat</summary> javascript import { detectColorFormat } from 'colore-js'; const formatHex = detectColorFormat('#ff0000'); console.log(formatHex); // Output: 'HEX'
<summary>parseColorToRgba</summary> javascript import { parseColorToRgba } from 'colore-js'; const rgbaHex = parseColorToRgba('#ff0000'); console.log(rgbaHex); // Output: { r: 255, g: 0, b: 0 }
<summary>parseHex</summary> javascript import { parseHex } from 'colore-js'; const rgb = parseHex('#ff0000'); console.log(rgb); // Output: { r: 255, g: 0, b: 0 }
<summary>parseHexAlpha</summary> javascript import { parseHexAlpha } from 'colore-js'; const rgba = parseHexAlpha('#ff000080'); console.log(rgba); // Output: { r: 255, g: 0, b: 0, a: 0.502 }

See all Parsers.

Validations

<summary>isValidHex</summary> javascript import { isValidHex } from 'colore-js'; console.log(isValidHex('#ff0000')); // Output: true
<summary>isValidHexAlpha</summary> javascript import { isValidHexAlpha } from 'colore-js'; console.log(isValidHexAlpha('#ff0000ff')); // Output: true
<summary>isValidHsl</summary> javascript import { isValidHsl } from 'colore-js'; console.log(isValidHsl('hsl(120, 100%, 50%)')); // Output: true
<summary>isValidHsla</summary> javascript import { isValidHsla } from 'colore-js'; console.log(isValidHsla('hsla(120, 100%, 50%, 0.5)')); // Output: true
<summary>isValidLab</summary> javascript import { isValidLab } from 'colore-js'; console.log(isValidLab('lab(50% 0% 0%)')); // Output: true

See all Validations.

See Documentation for complete API reference.

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

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.

更新日志

Changelog

All notable changes to this project will be documented in this file. See standard-version for commit guidelines.

1.4.2 (2024-08-02)

Features

  • add enhanceColor function for color manipulation (aedf1cb)

Chores

  • add .DS_Store to .npmignore (8caef0a)

Documentation

  • expand README with new API methods and examples (8cf7df8)
  • update README for better clarity and organization (fc330eb)
  • update README section headings to improve structure (81b9e3a)
  • update README with detailed feature sections (4f02b46)

1.4.1 (2024-07-29)

Features

  • docs: update sidebar to include setAlphaValue API (4c380a7)

Bug Fixes

  • support optional alpha value in RGBA parsing (6935d36)

1.4.0 (2024-07-28)

Features

  • add color conversion functions and documentation (992c627)
  • add default structured data for SEO (d875462)
  • Add description and keywords to hexToHsl doc page (4b28476)
  • Add description and keywords to hslToHex doc page (425535d)
  • Add description and keywords to isValidHsla docs (4ed2bfd)
  • Add description and keywords to recomposeColor.md (aaf470b)
  • Add description and keywords to saturateColor doc (a852135)
  • Add descriptive metadata to parseNamedColor doc page (de6ca6b)
  • Add detailed description and keywords to labToLch doc (580494f)
  • Add detailed description and keywords to rgbToHex doc page (ba91dbe)
  • Add documentation and structured data to parseHex.mdx (7eb29e5)
  • add getCssVariableValue and update tests and docs (a52123e)
  • add setAlphaValue function and related tests (93d8488)
  • add setCssVariableValue function (a474c8a)
  • analogousColors: Add analogous color palette tag (3d1e2f0)
  • Convert API documentation files to .mdx (9732acf)
  • docs: Add detailed metadata to getContrastRatio doc (f3b28b4)
  • docs: Update hslaToHexAlpha doc with description and keywords (9729da8)
  • docs: Update hsvToRgb documentation (b8c16ae)
  • docs: Update metadata in isValidRgb documentation (c437fa1)
  • documentation: Update rebuildColorFromRgba function guide (63bee99)
  • docusaurus.config: add trailingSlash configuration (b31b3c9)
  • Enhance hexToHsv documentation (7df595f)
  • Update decomposeColor documentation (86801f8)
  • Update keywords in StructuredData.tsx (cdab2d4)
  • Update lchToRgb.mdx documentation with detailed info (6ef2e6d)
  • Update title and tagline in Docusaurus config and index (71f187f)

Code Refactoring

  • Convert .md files to .mdx in generators directory (0c423d0)
  • Convert doc files to mdx format (c166ee5)
  • Convert doc files to mdx format (df88e43)
  • Convert validation doc files to .mdx format (c9dfafe)
  • Rename .md files to .mdx in analysis API docs (50a988e)
  • Rename API documentation files to mdx format (900ac14)

Documentation

  • Add description and keywords to analogousColors page (50100e6)
  • Add description and keywords to detectColorFormat doc (8ab5b90)
  • Add description and keywords to isValidLch.mdx (5424f50)
  • Add description and keywords to isValidXyz doc (d702f2e)
  • Add description and keywords to parseHsla doc (52000a4)
  • Add description and keywords to rgbToLab API doc (7d92866)
  • Add description and keywords to triadicColors doc (cfc5e25)
  • Add description and keywords to xyzToRgb doc (07f331c)
  • add detailed description and keywords to parseHsl.mdx (f7f5542)
  • Add detailed description and keywords to tetradicColors.mdx (3c9ecdc)
  • Add detailed description and keywords to xyzToLab (85ed08a)
  • Add detailed description to rgbToXyz page (e3f3294)
  • Add metadata and structure to parseLab doc page (037c620)
  • blendColors: Add description and keywords to documentation (ca33b2f)
  • Change file extensions from .md to .mdx (3634d43)
  • Expand generateInterpolatedColors MDX file (7d094f2)
  • Expand isValidHex documentation (a63d779)
  • Expand labToXyz API documentation (f8043ba)
  • Expand rgbToHsv function documentation (3afc238)
  • hslToRgb: Add detailed description and keywords (9efbae0)
  • parseHexAlpha: add description and keywords (12ea8bd)
  • Rename .md files to .mdx in harmony API docs (9660bc0)
  • Rename API utility documentation files (37b2975)
  • Simplify StructuredData component usage (f2f6b45)
  • Update cmykToRgb.mdx with detailed information (18474b3)
  • Update complementaryColor documentation (02883e0)
  • Update content in hexToRgb.mdx (861d013)
  • Update darkenColor documentation (35382c4)
  • Update desaturateColor documentation (6c2f645)
  • Update generateRandomColor.mdx metadata (4ff06f5)
  • Update getLuminance.mdx with description and keywords (9852740)
  • Update hexAlphaToHsla API doc metadata (19f4ed0)
  • Update hexAlphaToHsva documentation details (446cd6c)
  • Update hexAlphaToRgba documentation (763a87f)
  • Update hslaToRgba.mdx documentation (a9ab010)
  • Update hsvToHex documentation metadata (729c723)
  • Update invertColor documentation (5ecfbf3)
  • Update isValidHexAlpha documentation page (6b26f95)
  • Update isValidHsl documentation (260f0b8)
  • Update isValidLab.mdx documentation (4580a0f)
  • Update isValidNamedColor documentation (eeeb578)
  • Update isValidRgba metadata and import StructuredData (32dcaaa)
  • Update labToRgb documentation (eef0520)
  • Update lchToLab.mdx documentation (175ea3e)
  • Update lightenColor function documentation (cc71d67)
  • Update metadata and import component in hsvaToRgba documentation (74bb96f)
  • Update monochromaticColors API documentation (3e604d5)
  • Update parseColorToRgba documentation (a342179)
  • Update parseLch.mdx with description and keywords (a10656c)
  • Update parseRgb documentation (1c10974)
  • Update parseRgba documentation (347fd8b)
  • Update parseXyz documentation (8bd26a5)
  • Update rgbaToHexAlpha documentation (3464961)
  • Update rgbaToHsla documentation (3c98b27)
  • Update rgbaToHsva documentation (836b05b)
  • Update rgbToCmyk doc metadata and import (73eeafb)
  • Update rgbToHsl documentation (0afb94f)
  • Update rgbToLch documentation (05dbf98)

1.3.1 (2024-06-27)

Features

  • Add SOFT_LIGHT and HARD_LIGHT blending modes (0a1fcd0)
  • Add structured data and breadcrumbs components (217e7c4)
  • Convert installation doc to mdx and enhance SEO (b7c0093)
  • Convert Quick Start guide to MDX and add metadata (c4e72a2)
  • faq.mdx: Add detailed metadata for SEO (1db5b18)
  • Update docusaurus config for more structured navigation (a0de6c6)
  • Update Docusaurus config for theme and navbar (5632dca)
  • Update heroBanner and benefits styles in CSS (e54db22)
  • Update homepage content and layout (19d1ca2)
  • Update primary color palettes in CSS (4dfece0)
  • Update published dates and add breadcrumb labels (3f0878b)

Bug Fixes

  • remove duplicate 'description' from installation docs (277ca48)

Code Refactoring

  • Rename FAQ file extension from .md to .mdx (6976d87)

Documentation

  • Remove advanced and basic usage examples (84e1732)
  • remove source code from xyzToLab documentation (bf73c35)
  • Update code snippets in faq.mdx (5580625)
  • update FAQ link in quick-start guide (7a5b109)
  • Update introduction text and keywords in documentation (2908f3e)
  • update key features in introduction.md (6458d2e)
  • update key features in introduction.md (529d526)
  • Update README.md (db17be4)
  • Update the FAQ's structured data (e8af149)

1.3.0 (2024-06-21)

Features

  • Add documentation badge to README (f5b7bf2)
  • Add documentation button to README (2e9f6ad)
  • Add documentation for color generator functions (3fd916a)
  • add generateInterpolatedColors function (a064b36)
  • Add generateRandomColor utility and tests (fb9a6a9)
  • Add publish script and update doc (4096372)
  • generators: enhance generateInterpolatedColors function (8226e56)
  • Update badges and README details (434ecae)
  • Update project title and descriptions in docusaurus config (cfca828)
  • update README.md with dark theme image support (000c0da)

Bug Fixes

  • correct alt text for license badge in README (178ed9b)
  • update build badge link in README (cebfa2b)

Chores

  • deps: bump ws from 7.5.9 to 7.5.10 in /docs (74ed307)

Code Refactoring

  • Move generateRandomColor to generators directory (ae0ec45)
  • Move generateRandomColor to generators directory (4d6a284)

1.2.0 (2024-06-19)

Features

  • add color inversion functionality (d425f33)
  • Add HSLA to Hex Alpha conversion function (84d497c)
  • Add hslaToHexAlpha and invertColor in API documentation (dd7b62e)
  • Handle H value of 360 in hslaToRgba conversion (5d6c5c0)

1.1.6 (2024-06-16)

Chores

  • package.json: Remove assets/images from files array (66e7645)

1.1.5 (2024-06-16)

Features

  • Update repository URLs in multiple files (41ceda9)

1.1.4 (2024-06-16)

Features

  • Add assets/images to package files (730c65b)

1.1.3 (2024-06-16)

1.1.2 (2024-06-16)

Features

  • Update project repository URLs (2ea4ae8)

Documentation

  • Update NPM package links and badges in README (6ecaf9f)

1.1.1 (2024-06-16)

1.1.0 (2024-06-16)

Features

  • Add blendingModes utility file (5e22a2f)
  • Add CMYK to RGB conversion function (30b2acc)
  • add color blending functionality (fa94e95)
  • Add color parser for RGB, RGBA and LAB formats (cec5b83)
  • Add color parsing utility functions (a69b6c7)
  • Add color reformatting feature and adjust color format syntax (e4cd7aa)
  • Add complementary color calculation and tests (5f38faf)
  • Add comprehensive documentation for the 'colore' library (56a82a1)
  • Add CONTRIBUTING.md guide (14af32f)
  • add conversion function from HEX alpha to HSVA (0060901)
  • Add coverage badge to README.md (af47eb6)
  • Add darkenColor manipulation function (23f6ef7)
  • add desaturateColor manipulation function (759f057)
  • Add format option and detailed error in hslToRgb conversion (ec51b50)
  • Add function to calculate triadic colors (4369ab6)
  • Add function to find analogous colors (f9f8026)
  • add getLuminance function (0aacf10)
  • Add HEX color parsing and tests (90e351f)
  • Add HEX to HSL color conversion function (3516eb8)
  • Add hexAlphaToHsla conversion function and tests (e1304d9)
  • Add hexAlphaToRgba conversion function (f019432)
  • add hexToHsv conversion functionality (f209001)
  • add hexToRgb conversion function and jest test framework (48b6e4d)
  • Add hexToRgb conversion functionality (f196e23)
  • Add HSL color parsing and validation (ef4ef52)
  • Add HSL to HEX color conversion function (b134531)
  • Add HSL to RGB conversion function and tests (eb63994)
  • add hslaToRgba conversion function (96bc3cc)
  • add HSV to RGB conversion enhancements (5e4ecc9)
  • add HSV to RGB conversion functionality (0bae9fd)
  • Add HSVA to RGBA conversion functionality (fc6571c)
  • Add hsvToHex color conversion and tests (03407a0)
  • Add hue adjustment in hslToHex function (41b621b)
  • Add isValidRgba validation to parseRgba (2c6b7eb)
  • Add LAB to RGB and LCH to RGB/LAB conversion functionality (feff3f2)
  • Add LAB to XYZ color conversion function and tests (2be5411)
  • Add monochromatic color calculation functionality (b50a0c6)
  • Add named color parsing functionality (c5a706f)
  • Add netlify configuration file (a8ef144)
  • Add new colorFormats utility (0362da7)
  • Add object return option to hexToHsl conversion (c21269a)
  • Add option for RGB output format in cmykToRgb function (1d77163)
  • add parseColorToRgba function and tests (4d3f532)
  • Add parseXyz function and tests for it (9144cb1)
  • add range error throw to hslToHex function (5451d5f)
  • add recomposeColor function and corresponding tests (7bbe6b9)
  • Add RGB to CMYK conversion function and tests (df9b1f3)
  • Add RGB to HEX and RGB to HSL conversions (2d7d10a)
  • Add RGB to HSV color conversion (352e421)
  • add RGB to LAB color conversion (a587157)
  • add RGB to LCH conversion function (3371a97)
  • Add RGB to XYZ conversion functionality (130dd39)
  • Add RGBA to HEX Alpha conversion method (a35e6d8)
  • add RGBA to HSVA conversion function and tests (cd26438)
  • Add rgbaToHsla conversion function (5410a9d)
  • Add rounding for LAB to LCH conversion (2216702)
  • Add saturation manipulation and Lab to Lch conversion (f1cb618)
  • Add test coverage reporting to CI workflow (d716bf9)
  • Add tetradic color calculation function (be87dd5)
  • Add unit support to RGB parsing and validation (3bd4394)
  • Add XYZ color strings to README (595466d)
  • Add XYZ to LAB color conversion (599cca3)
  • add XYZ to RGB conversion function and tests (e0ba23e)
  • Added 'named' color format in colorFormats.ts (72ad54c)
  • allow darkenColor function to return undefined (3482423)
  • Allow undefined return in lightenColor function (d5c0616)
  • analysis: add getContrastRatio function and tests (e7d4ce8)
  • Append percentage sign to first argument in lab format (0c18b5f)
  • Change parseXyz output to object format (c45a610)
  • conversions: add error handler for invalid HEX in hexToHsl (290f87c)
  • conversions: enhance RGB to CMYK conversion (0564225)
  • conversions: handle hue value of 360 in hslToRgb conversion (91ee03d)
  • conversions: Update rgbToHsv to improve tolerance and extend test coverage (b0b9472)
  • Enhance build settings and add dev dependencies (a5c06b4)
  • Enhance HSL to HEX tests and handle invalid values (1640e0b)
  • Enhance HSLA color parsing and validation (7648724)
  • enhance hslToRgb function tests (44f9031)
  • Enhance LAB to RGB conversion tests and functionality (d0019fc)
  • Enhance LCH color validation logic (d145f60)
  • Enhance lchToRgb conversion with new tests and string output option (4aa96bf)
  • enhance README with badges and usage examples (edbb113)
  • Enhance xyzToRgb conversion functionality and tests (dd976f1)
  • Export darkenColor function (a9e2b50)
  • Export lightenColor from manipulations (2ab45fa)
  • extend isValidLab method to support wider range of LAB color formats (3626aa4)
  • Implement color format validation functions and tests (761dff4)
  • Implement ColorFormats in decomposeColor function (0a3e39d)
  • Implement lightenColor function and update error messages (bd766b5)
  • Implement parseToRgb function and related tests (45069f8)
  • Improve error messaging in hexToHsv conversion (9832bd6)
  • Improve error messaging in hexToRgb conversion (91c9c08)
  • Improve HEX color validation and error messaging (91a5b95)
  • improve LCH color validation and parsing (6e62bb2)
  • Improve precision in lightenColor test (55f93f4)
  • Improve RGBA and RGB color validation (fc82dd5)
  • Initial commit of kolors project (371f8bd)
  • parseHsl: update return type and enhance test coverage (b0339c6)
  • parser: add alpha support for color decompose tests (efb4c15)
  • parser: Add alphaNum attribute to parseLab function (d4b8de3)
  • parser: add alphaNum field to parseLab and parseLch (23e5952)
  • parser: add alphaNum property to LCH parser (bd5b02c)
  • parser: Add function to parse HSLA color strings (e7d25e3)
  • parser: add LCH color string parsing functionality (126ce2b)
  • parser: support named color format in rebuildColorFromRgba function (8c3552a)
  • parser: use ColorFormat enum in detectColorFormat function (73658e7)
  • parser: Utilize ColorFormat for parseColorToRgba case checks (8adb84d)
  • Remove detailed documentation from README.md (42b6aa1)
  • Remove error handling in analogousColors.ts (9ec10a4)
  • Remove error handling in analogousColors.ts (cf90a7d)
  • Remove error handling in analogousColors.ts (24401ad)
  • Remove error handling in analogousColors.ts (cc72dbe)
  • Remove percentage handling in parseComponent function (b8a0871)
  • Rename package and update descriptions (b80a9f4)
  • Rename project from 'kolors' to 'colore' (8affac9)
  • Reorganize index exports and add new functions (c7a710a)
  • Replace Google Analytics with Google gtag in Docusaurus (a69e3b6)
  • tests: update expected test result precision (4d72dc6)
  • tests: update precision in rgbToXyz.test.ts (7d47388)
  • Update .gitignore, README.md, and src/Index.ts (1473d8d)
  • update color format identification in recomposeColor function (e630812)
  • Update decomposeColor function and related tests (9916322)
  • Update desaturateColor tests for error handling (d2f8731)
  • Update documentation links and disable versioning (0c702a5)
  • update docusaurus config (79bea85)
  • Update error messages for invalid RGB values (2119295)
  • Update expected result formatting in rgbToLab tests (2cf78c1)
  • Update heroBanner background gradient in main CSS (a90aeab)
  • update hexToHsv method to handle string and object output (27abe2e)
  • Update HSLA color parsing functionality (5944f17)
  • Update import references from 'colore' to 'colore-js' (45987f8)
  • Update labToXyz conversion function and tests (f3dd16a)
  • Update LCH to LAB conversion to include percentage sign (0600a24)
  • update lchToLab function to throw errors for invalid values and return string or object (0fcf3b4)
  • Update package configuration and build process (f4416a3)
  • Update parseHex function to return object (0a6f510)
  • Update precision in xyzToLab test checks (3444c06)
  • update README.md with library details (cc29000)
  • Update return description for hexAlphaToRgba function (9e20a13)
  • Update return type in hexAlphaToHsla function (d77e0ed)
  • update RGB to HSL conversion and test cases (fbbb610)
  • Update RGB to XYZ conversion with string and error handling (9a57449)
  • Update xyzToLab to return string or object format (18b0e3b)

Bug Fixes

  • adjust logo dimensions in README (4f5d4b3)
  • adjust validation criteria for LAB color values (359f4e8)
  • change color validation functionality in isValidHsl.ts (b517126)
  • correct index position in isValidHsl checks (9f6da28)
  • correct return type description in lchToLab (272d2ec)
  • modify returned format of recomposeColor test (9b4379b)
  • parser: update lch and lab color format detection tests (3fc2764)
  • tests: Correct LAB to RGB conversion tests (5d2e85a)
  • update error message in rgbToCmyk conversion (ab44062)
  • update expected result in darkenColor test (530ddcf)
  • update expected values in rgbToLch test (909d985)
  • update regex patterns for hex color validation (6bd1d35)

Tests

  • conversions: update error messages in rgbToCmyk test (fe6afa1)
  • Un-comment and update color format validation test (9622d53)
  • Update invalid HSL test cases in isValidHsl.test.ts (2608b4e)

Code Refactoring

  • change div alignment in README.md (de681da)
  • change RGB representation from array to object in parseNamedColor (0508ae1)
  • conversions: improve hsvToHex functionality and tests (5f9d694)
  • extract parseComponent and parseAlpha functions in parseLab (78e6411)
  • extract roundTo function to colorUtils (149e98e)
  • hslToRgb: Adjusted return types in documentation comments (98179ac)
  • import roundTo function and precision adjustment in rgbToXyz (b1a814a)
  • improve LAB color parsing and validation (5814afc)
  • improve parsing of color formats in parseColorToRgba (f3b7049)
  • Improved RGB|RGBA color processing (d8c6f98)
  • Move regex to separate utility file (a086115)
  • parseHexAlpha: change return type to object, update tests (57c9531)
  • parser: simplify decomposeColor by importing parsing functions (426d50d)
  • rename parseToRgb to decomposeColor (bfd0eef)
  • replace string color format identifiers with enum (0dc3682)
  • Simplify triadic color calculation (4fef72b)
  • use ColorFormats enum in lightenColor function (055ce28)
  • Use enum for color formats in saturateColor function (57a64d6)

Documentation

  • Remove redundant description from README (a2a3cfa)
  • Update package installation instructions in README (f22a0a8)

Chores

  • ci.yml: Remove Node.js version 18 from testing matrix (520fcae)
  • Update .npmignore to exclude more files (7bc1b3f)