8000 Tags · supitsdu/colorus-js · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Tags: supitsdu/colorus-js

Tags

v2.1.0

Toggle v2.1.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
chore: update package peer dependencies (#97)

v2.0.1

Toggle v2.0.1's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
fix(dye): handle fallbackColor correctly and add regression test (#51)

* fix(dye): handle fallbackColor correctly and add regression test

* chore: bump version to 2.0.1

2.0.0

Toggle 2.0.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Release 2.0.0: Major Update with Enhanced Extensibility and Improved …

…Typing (#45)

* chore: update biome config

* chore: biome tracks configs written in JS

* chore: update jest config

* chore: update Rollup and TS configs

* feat: Major refactoring of Colorus.js

- Refactored file structure for improved organization and maintainability.
- Added support for custom parsers, allowing users to create and integrate their own color models.
- Enhanced TypeScript definitions for better type safety and developer experience.
- Streamlined core methods to include only essential getters: luminance, rgb, hsl, hsv, cmyk, alpha, hue, along with source and error properties.
- Introduced built-in plugins for common transformations: invert, lighten, darken, saturate, desaturate, toCmyk, toHex, toHsl, toHsv, toRgb.
- Achieved 100% test coverage with new Jest tests, ensuring reliability and stability of the library.

This refactor improves usability, extensibility, and performance while maintaining strong type safety.

* docs: Add docs for working w/ parsers and plugins

- Introduced sections detailing the creation and usage of custom parsers with the dye() function.
- Included examples for the HSL and HEX parsers, showcasing color parsing and transformation.
- Provided best practices for regex and extract functions, emphasizing clarity and valid RGB output.
- Added tips for maintaining consistency in color channel extraction and serialization.

* fix(ColorParser): reset `lastIndex` in each call

- Removed `y` flag from regex expressions to prevent unintended lastIndex behavior across multiple matches.
- Added a reset of `lastIndex` in the ColorParser class to ensure consistent regex execution and prevent zeroed outputs on repeated calls with identical inputs.

* test: refactor Jest tests for `toCmyk`, `toHsl`, `toHsv`, `toRgb`, and `dye` modules

- Updated tests to include validation for potential lastIndex-related issues in regex-based operations.
- Ensured consistent behavior across multiple calls with identical inputs to prevent regression.

* chore: update build and test configs

* docs: update README.md

* docs(README): improve overall structure & headings

* docs(guide): improve parsers & plugins guide

* chore(tsconfig): should report unused variables

* chore(biome): should report unused imports and variables

* fix(linter): fix reported errors by new linter rules

* docs(CONTRIBUTING): update guide

* chore(package.json): bump version to 2.0.0

* fix(plugins/invert): should pass options to new plugin instance

* feat: Implement efficient hex to RGB conversion

- Replaced the old method of converting hex color strings to RGB with a new approach that utilizes a single call to Number.parseInt().
- The new method improves performance significantly, reducing the average conversion time from 228.3 ns to 82.6 ns, making it 2.77x faster.
- The function now extracts RGB and alpha values using bitwise operations, enhancing efficiency and maintaining clarity.
- Added input validation to ensure hex strings are in the correct format (6 or 8 characters).
- Removed hexToInt() utility since it's not required anymore.

This change is crucial for improving the performance of color processing in the application.

* refact(validation): remove unused validation utils

* refact(types): refact the plugins options and params

* docs(parsers): fix codeblock examples

* docs: upload initial API reference

* docs: reference API docs at the README and more

v1.0.0

Toggle v1.0.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
build(deps-dev): bump @swc/core from 1.7.21 to 1.7.22 (#25)

Bumps [@swc/core](https://github.com/swc-project/swc) from 1.7.21 to 1.7.22.
- [Release notes](https://github.com/swc-project/swc/releases)
- [Changelog](https://github.com/swc-project/swc/blob/main/CHANGELOG.md)
- [Commits](swc-project/swc@v1.7.21...v1.7.22)

---
updated-dependencies:
- dependency-name: "@swc/core"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

v0.9.0

Toggle v0.9.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
feat: bump version (#13)

v0.8.0

Toggle v0.8.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Merge pull request #7 from supitsdu/hotfix

chore(package.json): fix name of package

v0.7.2

Toggle v0.7.2's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Fix: Rename Package from "colorus" to "colorus-js" to Resolve NPM Con…

…flict (#5)

* fix!: npm conflict with existing package names.

* chore: ignores unwanted *.svg vector in future NPM packages

* chore(package.json): bump version to 0.7.2

v.0.7.1

Toggle v.0.7.1's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
fix: remove default export to match type definitions (#3)

* fix: remove default export to match type definitions.

* chore(package.json): bump patch version to 0.7.1

v0.7.0

Toggle v0.7.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
feat: Introduce color manipulation enhancements and code improvements (

…#2)

* refact(jsdoc): add missing JSDoc for the formatter and nomalizer classes

* refact: Change default export in conversion and compose modules.

- refact(JSDoc): improves overall JSDoc

* chore(package.json): add eslint-plugin-jsdoc for better support of JSDoc while on development

* feat(luminance): add support to calculate relative luminance of an color

* feat(accessibility): Add method to check contrast ratio between two colors following WCAG 2.0.

See more on about https://www.w3.org/TR/WCAG20-TECHS/G17.html

* feat(Colorus): add a method to darken the current color by a specified amount.

* test(Colorus): add tests for `Colorus.darken()`method

* feat(Colorus): Add a method to reduce the saturation of the current color.

* test(Colorus): add tests for `Colorus.desaturate()` method

* feat(Colorus): add method to invert colors

* refact: Move type checking helper function inside helpers.js module

* feat: Add additional color object type checks to helpers module

This commit extends the functionality of the helpers module by adding new methods for checking if an object conforms to specific color representations. The new methods include isRgbObject, isHslObject, isHsvObject, and isCmykObject, which verify whether an object contains the necessary properties for representing colors in RGB, HSL, HSV, and CMYK formats, respectively. These additions enhance the modularity and versatility of the helpers module, providing more comprehensive support for color object validation.

* refactor: Replace colorObject.js and colorString.js with serialize module

This commit replaces the functionality of colorObject.js and colorString.js with the new serialize module. The serialize module provides functions for serializing and deserializing color objects, removing the need for separate modules. Additionally, this commit includes the addition of serialize.spec.js, a Jest testing file that covers 100% of the functionality in serialize.js, ensuring comprehensive test coverage.

* feat: Update main module to support serialize module

This commit updates the main Colorus module to utilize the new serialize module. Now, the Colorus class constructor uses the fromUserInput method from the serialize module to handle color input strings or objects. This change simplifies the codebase by removing the need for colorObject.js and colorString.js modules. Additionally, the main module now provides a more consistent color serialization and deserialization functionalities across the application.

* types: Enhance Colorus Type Definitions and Documentation (#1)

* feat(types): add initial type definitions

* types(Colorus): include contrastRatio, darken, and luminance methods.

* types: add some usage examples

* refact: improve Colorus class JSDoc comments

* types: add missing types and improve TSDoc comments

* types: improve structure, tsdoc, and namings of the types definitons

* chore(package.json): bump minor version to 0.7.0

* feat(Colorus): add new analytical method to run quick tests of color formats.

* docs: upload project favicon vector

* docs: Improve README.md with API Reference, key features, and Installation sections.

v0.6.0

Toggle v0.6.0's commit message
chore(package.json): bump the minor version to v0.6.0

0