Skip to content

Hue, Saturation, Luminance to Red, Green, Blue converter for Atmel AVR

Notifications You must be signed in to change notification settings

lewisd32/avr-hsl2rgb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

This library converts hue/saturation/luminance values to red/green/blue values, suitable for controlling RGB LEDs.

Two different functions are included for this purpose.
One (hsl2rgb_orig) is very slightly modified code from Johngineer's blog: http://www.johngineer.com/blog/?p=1022
Variable names are changed, but it it otherwise identical.
The other (hsl2rgb) is an optimized version which produces *almost* identical output, but is 13x faster on an ATmega.

See hsl2rgb.cpp for more information.

Written by Derek Lewis, with code from "Johngineer".
MIT license, all text above must be included in any redistribution

To download. click the DOWNLOADS button in the top right corner, rename the uncompressed folder hsl2rgb.

Place the hsl2rgb library folder your <arduinosketchfolder>/libraries/ folder.  Create the libraries folder if it does not exist.  You'll need to restart the Arduino IDE for it to recognize the new library.

About

Hue, Saturation, Luminance to Red, Green, Blue converter for Atmel AVR

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages