1.0.0 • Published 8 years ago

@f/hsv-to-rgb v1.0.0

Weekly downloads
2
License
MIT
Repository
github
Last release
8 years ago

hsv-to-rgb

Build status Git tag NPM version Code style

Convert an HSV color to RGB

Installation

$ npm install @f/hsv-to-rgb

Usage

var hsvToRgb = require('@f/hsv-to-rgb')

hsvToRgb(74, 0.19, 0.41) // -> [100, 105, 85]

API

hsvToRgb(hue, saturation, value)

  • hue - Hue expressed as an integer between 0 and 360.
  • saturation - Saturation expressed as a floating point between 0 and 1.
  • value - Value (aka Brightness) expressed as a floating point between 0 and 1.

Returns: An array containing [red, green, blue] values that correspond to the HSV color you specified.

License

MIT