On Monday, 5 January 2015 at 15:57:32 UTC, Ola Fosheim Grøstad wrote:
But I agree that colour theory is solid enough to be considered stable and that it would be a great benefit to have a single library used across multiple projects. It is also very suitable for templated types.

Yeah, in my misc repo, there used to be stand along image.d and simpledisplay.d. Now, they both depend on color.d. Even just a basic definition we can use elsewhere is nice to have so other libs can interop on that level without annoying casts or pointless conversions just to please the type system when the contents are identical.

I went with struct Color { ubyte r,g,b,a; } .... not perfect, probably not good enough for like a Photoshop, and sometimes the bytes need to be shuffled for different formats, but eh it works for me.

Reply via email to