Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/Copypeng/react-native-HsvToRgb

a helper to convert HSV(HSB) color to RGB
https://github.com/Copypeng/react-native-HsvToRgb

Last synced: 5 days ago
JSON representation

a helper to convert HSV(HSB) color to RGB

Awesome Lists containing this project

README

        

## 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}