std.experimental.color, request reviews

Tofu Ninja via Digitalmars-d digitalmars-d at puremagic.com
Wed Jun 24 00:18:16 PDT 2015


On Wednesday, 24 June 2015 at 04:47:35 UTC, Manu wrote:
> They work fine. Just cast between color structs with different 
> component orders:
>
> BGR8 a = Color.white;
> RGB8 b = a; // <- did swizzle
>
> Is there a specific api you miss?
>
>
> On 24 June 2015 at 05:34, Tofu Ninja via Digitalmars-d 
> <digitalmars-d at puremagic.com> wrote:
>> On Tuesday, 23 June 2015 at 14:58:35 UTC, Manu wrote:
>>>
>>> https://github.com/D-Programming-Language/phobos/pull/2845
>>>
>>> I'm getting quite happy with it.
>>> I think it's a good and fairly minimal but useful starting 
>>> point.
>>>
>>> It'd be great to get some reviews from here.
>>
>>
>> Swizzels would be a nice addition.

Ahh, I was thinking more about swizzling the color channels 
themselves, not just conversion to different color layouts.
RGB8 a = RGB8(0,1,2);
RGB8 b = a.rbg;
assert(b == RGB8(0,2,1));


More information about the Digitalmars-d mailing list