@nmsn/color-utils
v0.4.0
Published
A color transform utils collection.
Maintainers
Readme
color-utils
English | 简体中文
Color conversion tool library.
Features
RGB/RGBA/HEX/HSL/HSLA/color-namecolor interconversion. ([color-name]- Validators for the above types of colors.
- Provide computational multi-color fusion function.
- Provides the function of calculating the complementary color.
- Provide the function of judging the color light and dark (mostly used to deal with the relationship between the background color and the displayed text).
Install
npm install @nmsn/color-utilsUsage
import { isLight } from '@nmsn/color-utils';
const isLightColor = isLight('#999'); // trueOnline Address: https://color-utils-site.vercel.app/
Project Address: https://github.com/nmsn/color-utils-site
Finished
- [x]
RGB/RGBA/HEX/HSL/HSLA/color-nameinterconversion. - [x] Checksum functions for each color format.
- [x] Unit testing of existing features.
- [x] Color fusion calculations.
- [x] Complementary color calculation.
- [x] Color brightness judgment.
- [x]
RollupBasic Function Package.
Todo
- [ ]
Rolluppacked volume optimization. - [ ] Code optimization.
