Named Colors In Flex

Named Colors In Flex
Have you ever run into the scenario where you are using data from a legacy html-based system in a flex application, and you have data that isn't really formatted for flex? I have, and it can get to be quite annoying sometimes, but there is always a workaround. Well, in this case I needed to convert web-named colors into their numeric equivalient. I created a simple util class that allows you to do a lookup by name (non case sensitive) to convert the named color to its numeric equivalent. It also allows you to pass in a numeric value and get a hex string out of it. It's actually pretty handy, and I figure others can benefit from using it too, so here it is... Feel free to contact me with any questions or comments at andrew.trice[ at ]cynergysystems.com. Enjoy!

You can also find this code on the Flex Cookbook site by Adobe.

Share

0 条评论

留下评论