1.0.14 • Published 2 years ago
@etertops/color-tools v1.0.14
color-tools
Description
color-tools
Software Architecture
Used to convert different types of color values
Installation
- Installation
npm i @etertops/color-tools
yarn add @etertops/color-tools
Instructions
- Instructions
import { convert, toRgb, toHex, rgbaToRgb, getColorGray, darkColor } from "@etertops/color-tools"
convert('#05f', 'rgb') // { r: 0, g: 85, b: 255 }
convert('#05f', 'hsl') // { h: 220, s: 100, l: 50 }
convert('#05f', 'hsv') // { h: 220, s: 100, l: 100 }
toRgb('#05f') // "rgb(0, 85, 255)"
toHex('rgb(0, 85, 255)') // "#0055ff"
getColorGray('rgb(0, 85, 255)') // 79
darkColor('rgb(0, 85, 255)') // true
darkColor('rgb(0, 85, 255)', 78) // false
rgbaToRgb('rgba(0, 0, 0, .5)') // "rgb(128, 128, 128)"
rgbaToRgb('rgba(0, 0, 0, .5)', 'rgb(128, 24, 46)') // "rgb(64, 12, 23)"
Contribution
- Fork the repository
- Create Feat_xxx branch
- Commit your code
- Create Pull Request
1.0.14
2 years ago
1.0.13
2 years ago
1.0.12-alpha.4
2 years ago
1.0.12-alpha.3
2 years ago
1.0.12-alpha.2
2 years ago
1.0.12-alpha.1
2 years ago
1.0.11
2 years ago
1.0.10
2 years ago
1.0.9
2 years ago
1.0.8
2 years ago
1.0.7
2 years ago
1.0.6
2 years ago
1.0.5
2 years ago
1.0.4
2 years ago
1.0.3
2 years ago
1.0.2
2 years ago
1.0.1
2 years ago