January 08, 2015
Ah yeah, supporting w3c standards is probably a sensible move.
On 08/01/2015 9:55 am, "via Digitalmars-d" <digitalmars-d@puremagic.com>
wrote:

> On Wednesday, 7 January 2015 at 20:57:51 UTC, Xavier Bigand wrote:
>
>> I think it can be interesting to provide some string formats can be directly converted into color structures.
>>
>> For example :
>>  - plain color names : "red", "blue", "light gray",...
>>  - hexadecimal : "#FF3CBB", "#FF3CBBAA" (same with alpha)
>>  - decimal : "255, 158, 200", "255, 158, 200, 170"
>> ...
>>
>> I think to that cause I saw many times tools using pretty close syntax for color definitions but with boring variations (generally for the alpha position).
>>
>
> It is defined in a w3c standard and refined in a draft, but probably does not belong in the colour module, but a media-file parser module?
>
> However, the at least the following colour spaces are mentioned as supported in w3c documents:
>
> L*ab, L*CHab, HSL, HWB
>
> http://www.w3.org/TR/SVGColorPrimer12/
>
> http://dev.w3.org/csswg/css-color/
>
>


January 08, 2015
On Thursday, 8 January 2015 at 02:56:36 UTC, Manu via Digitalmars-d wrote:
>> L*ab, L*CHab, HSL, HWB

C#'s and Java's colour struct provides what they call HSB which is related to HSV. In computer vision a variant is HSI.

http://en.wikipedia.org/wiki/HSL_and_HSV

Java has a separate colour space type with quite extensive support, I guess that is a good reference for what is useful:

http://docs.oracle.com/javase/7/docs/api/java/awt/color/ColorSpace.html

http://docs.oracle.com/javase/7/docs/api/java/awt/Color.html
January 08, 2015
And for completeness:

http://en.wikipedia.org/wiki/CIECAM02
January 09, 2015
You can take a look at what color formats does freeimage supports.
1 2 3 4 5 6
Next ›   Last »