fponticelli / thx.color

General purpose color library for Haxe
http://thx-lib.org
MIT License
38 stars 4 forks source link

ColorAlpha refactoring #3

Closed fponticelli closed 11 years ago

fponticelli commented 11 years ago

What about removing the alpha classes? We can do that by adding a method toStringAlpha(alpha : Float) to Color. ColorAlpha will still extend Color and contain the following fields: color : Color, alpha : Float And toString will change into return color.toStringAlpha(alpha).

What do you think?

jdonaldson commented 11 years ago

Yeah, I like the idea. Alpha has nothing to do with the color space. It will save a lot of unnecessary classes.

fponticelli commented 11 years ago

Ok, I'll do it. Is it better toStringAlpha(alpha) or toAlphaStirng(alpha) ?

fponticelli commented 11 years ago

done. Also added toCSS3 and toCSS3Alpha(alpha)