Creating an HSV Color Picker in ActionScript 3 for Flash

Ok, so you want to know how to mess with HSV (or HSB or HSL) colors, how to do sliders, and/or organize things into classes in ActionScript. Perhaps you just need a cool little color picker.

You’re welcome to download the source code for the sample Flash below and use it for whatever you like. It’s ready to compile using FlashDevelop.

Below is the sample Flash. The class ColorPicker displays the three bars with the triangle sliders. The dot is drawn in main.as in response to events from the ColorPicker.

Oh!! I found the HSV/RGB conversion functions here: CRON’S WEB TECH BLOG

** 9 AUG 2011: I’ve noticed a few people a day find this article through a search engine. If you found this stuff useful, please post a comment. I probably should start posting more of my source stuff because it’s not magic, and I learned how to do these things by reading what others wrote, and it makes sense to give back.

Comments

4 responses to “Creating an HSV Color Picker in ActionScript 3 for Flash”

  1. Singgum3b: Neato. Your profile doesn't list a blog yet. You could start one and post the plugin there, then let me know and I'll put a link to it on this post.

  2. Cool,i'm gonna use this for a photoshop colorwheel plugin.
    Drop me a line if u want it.

  3. Cool! Of course you can take the parts and make any sorts of sliding controls out of them…

  4. Thank you for this post, helps a lot!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.