color-manipulation-utils
v1.0.10
Published
Check contrast of colors HEX
Downloads
6,174
Maintainers
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.
Installation
You can install the package via npm:
npm
npm install color-manipulation-utils
yarn
yarn install color-manipulation-utils
pnpm
pnpm add color-manipulation-utils
Usage
Darken a Color
Import the darken
function from color-manipulation-utils
:
import { darken } from 'color-manipulation-utils';
or
import darken from 'color-manipulation-utils/darken';
Darken a color:
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
:
import { lighten } from 'color-manipulation-utils';
Or
import lighten from 'color-manipulation-utils/lighten';
Lighten a color:
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 guide for detailed information on how to get involved.
Code of conduct
Respect our CODE OF CONDUCT
License
This project is licensed under the MIT License - see the LICENSE file for details.