1.0.14 • Published 3 years ago

@etertops/color-tools v1.0.14

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
3 years ago

color-tools

Description

color-tools

Software Architecture

Used to convert different types of color values

Installation

  1. Installation
npm i @etertops/color-tools

yarn add @etertops/color-tools

Instructions

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

  1. Fork the repository
  2. Create Feat_xxx branch
  3. Commit your code
  4. Create Pull Request
1.0.14

3 years ago

1.0.13

3 years ago

1.0.12-alpha.4

3 years ago

1.0.12-alpha.3

3 years ago

1.0.12-alpha.2

3 years ago

1.0.12-alpha.1

3 years ago

1.0.11

3 years ago

1.0.10

3 years ago

1.0.9

3 years ago

1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago