colorless-core

1.1.0 • Public • Published

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

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.1.0
    1
    • latest

Version History

Package Sidebar

Install

npm i colorless-core

Weekly Downloads

0

Version

1.1.0

License

MIT

Unpacked Size

9.24 kB

Total Files

7

Last publish

Collaborators

  • flav