1.0.0 • Published 8 years ago

@f/hsl-to-rgb v1.0.0

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

hsl-to-rgb

Build status Git tag NPM version Code style

Convert HSL colors to RGB

Installation

$ npm install @f/hsl-to-rgb

Usage

var hslToRgb = require('@f/hsl-to-rgb')

hslToRgb(214, 1, .50) // [0, 110, 255]

API

hslToRgb(hue, saturation, lightness)

  • hue - Hue, expressed as an integer between 0 and 360.
  • saturation - Saturation, expressed as a floating point between 0 and 1.
  • lightness - Lightness, expressed as a floating point between 0 and 1.

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

License

MIT