thomaslein / util.colour

Utility colour functions

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

A collection of Colour utility functions.

Usage

var colourUtils = require('util.colour');

colourUtils.toComponent('rgb(0,128,255)'); // => {r:0,g:128,b:255}
colourUtils.toComponent('#ff38cf'); // => {r:255,g:56,b:207}
colourUtils.toComponent('#f36'); // => {r:255,g:51,b:102}
colourUtils.rgba('#f36', 0.5); // => 'rgba(255,51,102,0.5)'

About

Utility colour functions


Languages

Language:JavaScript 100.0%