func HueToRGB(p float64, q float64, t float64) float64 {
	if t < 0 {
		t++
	}
	if t > 1 {
		t--
	}
	if t < float64(1)/float64(6) {
		return p + (q-p)*6*t
	}
	if t < float64(1)/float64(2) {
		return q
	}
	if t < float64(2)/float64(3) {
		return p + (q-p)*(float64(2)/float64(3)-t)*6
	}
	return p
}
HueToRGB converts the color from Hue to RGB.

reference: https://www.ginifab.com.tw/tools/colors/js/colorconverter.js
package noire
import (
	"encoding/hex"
	"fmt"
	"math"
	"strings"
)
type Color struct {
	Red   float64
	Green float64
	Blue  float64
	Alpha float64
}
func newColor(r float64, g float64, b float64, a float64) Color {
	if r > 255 {
		r = 255
	} else if r < 0 {
		r = 0
	}
	if g > 255 {
		g = 255
	} else if g < 0 {
		g = 0
	}
	if b > 255 {
		b = 255
	} else if b < 0 {
		b = 0
	}
	if a > 1 {
		a = 1
	} else if a < 0 {
		a = 0
	}
	return Color{
		Red:   r,
		Green: g,
		Blue:  b,
		Alpha: a,
	}
}
func CMYKToRGB(c float64, m float64, y float64, k float64) (r float64, g float64, b float64) {
	c = c / 100
	m = m / 100
	y = y / 100
	k = k / 100
	r = 1 - math.Min(1, c*(1-k)+k)
	g = 1 - math.Min(1, m*(1-k)+k)
	b = 1 - math.Min(1, y*(1-k)+k)
	r = math.Round(r * 255)
	g = math.Round(g * 255)
	b = math.Round(b * 255)
	return
}
func RGBToCMYK(r float64, g float64, b float64) (c float64, m float64, y float64, k float64) {
	r = r / 255
	g = g / 255
	b = b / 255
	k = math.Min(1-r, 1-g)
	k = math.Min(k, 1-b)
	if (1 - k) == 0 {
		c = 0
		m = 0
		y = 0
	} else {
		c = (1 - r - k) / (1 - k)
		m = (1 - g - k) / (1 - k)
		y = (1 - b - k) / (1 - k)
	}
	c = math.Round(c * 100)
	m = math.Round(m * 100)
	y = math.Round(y * 100)
	k = math.Round(k * 100)
	return
}