std.experimental.color, request reviews

Manu via Digitalmars-d digitalmars-d at puremagic.com
Wed Jun 24 21:03:45 PDT 2015


On 25 June 2015 at 07:05, Tofu Ninja via Digitalmars-d
<digitalmars-d at puremagic.com> wrote:
> On Wednesday, 24 June 2015 at 08:47:50 UTC, Manu wrote:
>>
>> Ah okay.
>> Yeah, it's an interesting idea. It's only applicable to RGB colours.
>> What's a bit awkward, is it's not entirely clear where the result of
>> the swizzle is assigned? Is the result of the swizzle assigned to the
>> colours present in the order of appearance in the current layout?
>> BGR8 a = Color.white;
>> BGR8 b = a.rbg;
>>
>> is that: b=r, g=b, r=g, or is it r=r, g=b, b=g? Surely it's the former,
>> but that means you need to be conscious of the colour layout whenever you
>> perform a swizzle; ie, it will do different things for different layouts...
>
>
> Ahh yes, I didn't think of that. I think for the 99% of people who are just
> using RGBA8 everywhere, it would still be valuable. But if it didn't get in
> I wouldn't be too disappointed.

Sadly not, windows used BGR in basically all OS api's.
Compatibility support usually required BGR too, since that was the
only color format supported by old video hardware for a long time.


More information about the Digitalmars-d mailing list