porklib: Simple library for programming Arduino in C
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
avr-lib/lib/hsl.h

20 lines
301 B

10 years ago
#pragma once
/*
HSL support (addition to colors.h)
*/
#include "colors.h"
// Define HSL_LINEAR to get more linear brightness in hsl->rgb conversion
// HSL data structure
typedef struct {
uint8_t h;
uint8_t s;
uint8_t l;
} hsl_t;
/* Convert HSL to XRGB */
xrgb_t hsl2xrgb(const hsl_t color);