You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, the API provided only allows you to create colors based on the RGB color model (either by specifying RGBA color values direction in compliance with RGBA32, or by specifying HSL/HSV color values).
It may be useful to provide support for other color models (YUV, primarily). In theory, it should be possible to implement basic support for this without changing the representation of Color; instead, functions could be provided that do the conversion.
A more ideal model would provide separate color classes (or at least easy and consistent access to packed values) for various color models so that it is more easily possible to do things like write renderer-specific shaders that use those values directly; but this may be beyond the scope of a simple addition.
One particularly interesting YUV color model is OkLab. Java support has been implemented in the colorful-gdx, and can provide a basic reference point.
There are other YUV color spaces that may be useful as well.
The text was updated successfully, but these errors were encountered:
One thing that also should probably be supported is color interpolation/specific gradient instances that use YUV colors as their native representation. One of the primary benefits to OkLab, for example, is it provides much smoother color interpolation; so simply converting OkLab colors to RGB and interpolating with the RGB colors won't produce much of the benefit.
It should be possible to provide some sort of gradient abstraction which allows you to perform interpolation with some arbitrary algorithm on a color space, then convert the result of that to RGB, which would preserve much of the benefit without requiring renderer-specific code to change its color representation.
Currently, the API provided only allows you to create colors based on the RGB color model (either by specifying RGBA color values direction in compliance with RGBA32, or by specifying HSL/HSV color values).
It may be useful to provide support for other color models (YUV, primarily). In theory, it should be possible to implement basic support for this without changing the representation of Color; instead, functions could be provided that do the conversion.
A more ideal model would provide separate color classes (or at least easy and consistent access to packed values) for various color models so that it is more easily possible to do things like write renderer-specific shaders that use those values directly; but this may be beyond the scope of a simple addition.
One particularly interesting YUV color model is OkLab. Java support has been implemented in the colorful-gdx, and can provide a basic reference point.
There are other YUV color spaces that may be useful as well.
The text was updated successfully, but these errors were encountered: