MichaelFenwick / Color

A simple Dart package exposing a Color class which can be used to create, convert, and compare colors.
http://pub.dartlang.org/packages/color
MIT License
52 stars 18 forks source link

toHexString lacks leading zeroes for components #1

Closed johsin18 closed 10 years ago

johsin18 commented 10 years ago

So new Color.rgb(0, 0, 0).toHexString() will give '000' instead of '000000'. This is not accepted by HTML canvas for example, and it's ambiguous in general anyway, e.g. 'ff00'.

MichaelFenwick commented 10 years ago

Good catch. This is resolved and I've published the fix to pub.