colour lib needs reviewers

Manu via Digitalmars-d digitalmars-d at puremagic.com
Mon Sep 12 19:50:02 PDT 2016


On 13 September 2016 at 12:05, Walter Bright via Digitalmars-d
<digitalmars-d at puremagic.com> wrote:
> On 9/12/2016 2:08 PM, John Colvin wrote:
>>
>> On Monday, 12 September 2016 at 19:59:58 UTC, Edwin van Leeuwen wrote:
>>>
>>> On Monday, 12 September 2016 at 19:55:57 UTC, Guillaume Piolat wrote:
>>>>
>>>> - I've wanted a function like colorFromString many times. It's
>>>> especially
>>>> nice with the added #RGBA and #RRGGBBAA syntax that eg. SVG lacks.
>>>
>>>
>>> What happens when the string is invalid? Does it throw an error?
>>
>>
>> It should be integrated with std.conv.parse and std.conv.to and follow
>> their
>> conventions.
>
>
> I'm not so sure. Follow the conventions, ok, but integrating them in - they
> are already large and complex.

std.conv.to  seems to 'just work' for color type conversion.
I'd like to support string -> color conversion via std.conv.to; ie:
auto c = "#FFFF00".to!RGB8;
Is there a simple way to do that?


More information about the Digitalmars-d mailing list