Skip to content

MattEzekiel/color-manipulation-utils

Repository files navigation

🎨 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.

GitHub Repo stars GitHub watchers GitHub forks

Version License

Made with Node Package - Yarn Package - TypeScript

NPM Package Downloads GitHub Downloads (all assets, all releases)

GitHub Issues Pull Requests

Github Sponsors BuyMeACoffee

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.