colorless-core
v1.1.0 color hex rgb palette tint shade
Colorless
Colorless is library that allow you to transform easily color format and generate shade or color.
Features
- You can switch from #000000 to rgb(0, 0 ,0) or vice versa
- You can shade or tint color with shade() and tint() functions
- You can generate from a color a palette of shade with new Colorless(color)
Install
npm install colorless-core
or
yarn add colorless-core
Usage
Tint
Tint accept 4 arguments
- First 3 are rgb color
- The fourth is a factor of tint
import { tint } from 'colorless-core'
const tintedColor = tint(255, 255, 255, 0.5)
Shade
Shade accept 4 arguments
- First 3 are rgb color
- The fourth is a factor of shade
import { tint } from 'colorless-core'
const shadedColor = shade(0, 0, 0, 0.5)
Colorless
Colorless accept as argument a hex color
import { Colorless } from 'colorless-core'
const instace = Colorless('#FF00')
instance.toString()
instance.toJSON()
instance.toMap()
App
website : Colorless