Color Const: grays, html colors, svg colors


/ Published in: ActionScript 3
Save to your folder(s)

This is based on http://www.snipplr.com/view/46082/as3-html-color-keywords-colorname-class/

I found that link really useful, but it's more complex than I needed. I just wanted a simple list of consts. So I ran the above through a regexp and extracted the following code, adding the grays to it.

I also added the NO_COLOR const, which I sometimes find useful (and why I used ints intead of uints, which can't ever be negative). Color values are always positive numbers. There's no equivalent to null, because zero is a color (black). So NO_COLOR is my faux null.

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.