std.experimental.color, request reviews

Tofu Ninja via Digitalmars-d digitalmars-d at puremagic.com
Wed Jun 24 14:05:09 PDT 2015


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.


More information about the Digitalmars-d mailing list