Color classes
Opened this issue · 0 comments
octylFractal commented
LWJGL3 has no color classes, and we probably want something more complex than just Color
. We need at least double
and int
variations so that there is no loss of precision when using doubles
. We should also consider using HSL
or HSV
and converting those to RGB
when needed.
I propose the following classes (all classes support alpha
regardless):
RGBColorD
RGBColorI
HSLColorD
HSLColorI
CYMKColorD
CYMKColorI
and also Colors
for automatically returning the right type based on arguments. Each of the different types will offer conversions to the other type, i.e. RGB
⇆ HSL
⇆ CYMK
. Conversions from int
→ double
will be available, but probably not double
→ int
because of precision.