TechShroom/Blittr

Color classes

Opened this issue · 0 comments

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. RGBHSLCYMK. Conversions from intdouble will be available, but probably not doubleint because of precision.