colour lib needs reviewers

Guillaume Piolat via Digitalmars-d digitalmars-d at puremagic.com
Tue Sep 13 05:22:00 PDT 2016


On Monday, 12 September 2016 at 22:51:14 UTC, Walter Bright wrote:
>
> My last comment is what can I do with a color library that 
> would not require some additional library?

Having correct conversions.

Converting sRGB to linear RGB is typically not done correctly, 
pow isn't enough.
It also dissipates most misunderstanding about color space (yes 
Lab also are dependent on the color point, it was something I 
wasn't sure about and this library says it clearly).

Right now I rely on the OS for Apple RGB to sRGB conversion, this 
library would allow me to do it without using a system call.

Other uses I can imagine:
- Downsampling an image preserving colors (compressed RGB isn't 
necessarily the right sep to do those)
- Perceptually correct color gradients. In font rendering,
- HSV is very useful for colouring stuff in video games, it's 
what the color selection does in painter-programs like GIMP. So 
lots of library out there have a HSV <-> RGB conversions
- converting to packed RGB is useful for programs using GPUs. 
Same reason than half-float support is useful.




More information about the Digitalmars-d mailing list