func hslToRgb(h, s, l float64) (rgb int) {
	r, g, b := colorconv.HSLToRGB(h, s, l)
	return packColor(int(r), int(g), int(b))
}
given Hue, Saturation, and Lightness components, returns a 24-bit int color
uses github.com/dayvonjersen/sadbox/color for conversion because math is hard
by rodrigo moraes, exported from google code
package vibrant
import (
	"fmt"
	"image/color"
	"math"
	colorconv "github.com/dayvonjersen/sadbox/color"  
)
type Color int
func (c Color) String() string {
	return c.RGBHex()
}
func (c Color) RGB() (r, g, b int) {
	return unpackColor(int(c))
}
func (c Color) RGBHex() string {
	r, g, b := unpackColor(int(c))
	return fmt.Sprintf("#%02x%02x%02x", r, g, b)
}
func (c Color) TextColor(contrastRatio float64) Color {
	if contrast(0xffffff, int(c)) >= contrastRatio {
		return Color(0xffffff)
	}
	return Color(0)
}
func (c Color) TitleTextColor() Color {
	return c.TextColor(MIN_CONTRAST_TITLE_TEXT)
}
func (c Color) BodyTextColor() Color {
	return c.TextColor(MIN_CONTRAST_BODY_TEXT)
}
func colorToRgb(c color.Color) (int, int, int) {
	r, g, b, _ := c.RGBA()
	return int(r >> 8), int(g >> 8), int(b >> 8)
}
func packColor(r, g, b int) int {
	return (r << 16) | (g << 8) | b
}
func unpackColor(color int) (r, g, b int) {
	r = color >> 16 & 0xff
	g = color >> 8 & 0xff
	b = color >> 0 & 0xff
	return r, g, b
}
func unpackColorFloat(color int) (r, g, b float64) {
	ir, ig, ib := unpackColor(color)
	r = float64(ir)
	g = float64(ig)
	b = float64(ib)
	return r, g, b
}
func rgbToHsl(color int) (h, s, l float64) {
	r, g, b := unpackColor(color)
	h, s, l = colorconv.RGBToHSL(uint8(r), uint8(g), uint8(b))
	return
}