https://github.com/mattezekiel/color-manipulation-utils
Check contrast accesibility
https://github.com/mattezekiel/color-manipulation-utils
accessibility color colors css npm npm-package package sponsor sponsors typescript ui
Last synced: about 2 months ago
JSON representation
Check contrast accesibility
- Host: GitHub
- URL: https://github.com/mattezekiel/color-manipulation-utils
- Owner: MattEzekiel
- License: mit
- Created: 2024-06-19T14:13:58.000Z (12 months ago)
- Default Branch: master
- Last Pushed: 2025-03-05T20:46:50.000Z (3 months ago)
- Last Synced: 2025-04-06T12:43:58.809Z (2 months ago)
- Topics: accessibility, color, colors, css, npm, npm-package, package, sponsor, sponsors, typescript, ui
- Language: TypeScript
- Homepage: https://www.npmjs.com/package/color-manipulation-utils
- Size: 42 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# 🎨 Color Manipulation Utils
This package provides utilities for manipulating colors in JavaScript/TypeScript applications. This package can help you to use a better contrast for a background color and a color text.


[](#license "Go to license section")[](https://nodejs.org)
[](https://classic.yarnpkg.com)
[](https://www.npmjs.com/package/typescript)[](https://www.npmjs.com/package/color-manipulation-utils)

[](https://github.com/sponsors/mattezekiel)
[](https://cafecito.app/mattezekiel)## Installation
You can install the package via npm:
### npm
````bash
npm install color-manipulation-utils
````
### yarn
````bash
yarn install color-manipulation-utils
````
### pnpm
````bash
pnpm add color-manipulation-utils
````## Usage
### Darken a Color
Import the `darken` function from `color-manipulation-utils`:
````typescript
import { darken } from 'color-manipulation-utils';
````
or````typescript
import darken from 'color-manipulation-utils/darken';
````Darken a color:
````typescript
const darkenedColor = darken('#7a0f0f', 0.2);
console.log(darkenedColor); // Outputs a darkened color in hex format
````### Lighten a Color
Import the `lighten` function from `color-manipulation-utils`:
````typescript
import { lighten } from 'color-manipulation-utils';
````
Or````typescript
import lighten from 'color-manipulation-utils/lighten';
````
Lighten a color:````typescript
const lightenedColor = lighten('#068806', 0.2);
console.log(lightenedColor); // Outputs a lightened color in hex format
````## Contributing and Issue Tracking
If you're interested in contributing to wa.me-converter or want to report an issue, please check out our [CONTRIBUTING.md](./CONTRIBUTING.md) guide for detailed information on how to get involved.## Code of conduct
Respect our [CODE OF CONDUCT](./CODE_OF_CONDUCT.md)## License
This project is licensed under the MIT License - see the [LICENSE](https://github.com/MattEzekiel/color-manipulation-utils/blob/master/LICENCE.md) file for details.