a helper to convert HSV(HSB) color to RGB
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.gitignore Initial commit Oct 14, 2015
HsvToRgb.js add getRGBString method. Oct 18, 2015
LICENSE Initial commit Oct 14, 2015
README.md Update README.md Nov 12, 2015

README.md

Introduction

A helper to convert HSV(HSB) color to RGB.

As in react native framework, only #hex|rbg|rbga colors are accepted,I made this helper to convert HSV to RGB.

Install

just download HsvToRgb.js Please.

Usage


var HsvToRgb = require('../helper/HsvToRgb.js');
...

// accepts parameters
// h, hue, 0.0 to 1.0
// s, saturation, 0.0 to 1.0
// v, lightness or brightness, 0.0 to 1.0

var colorString = HsvToRgb.getRGBString(h,s,v);     //retun "rbg(r,g,b)"

var color =  HsvToRgb.getRGB(h,s,v);         //return {r,g,b}