1. Technology
You can opt-out at any time. Please refer to our privacy policy for contact information.

Deconstructing the Paint Application X: Color Palettes


Key to the operation of the Flash Oekaki/Paint Application is the color palette; almost all the tools use variables passed from the color palette. I’ve set up two palettes for my application: one basic one with twelve rudimentary colors for quick access, and another with a larger range of shades that remains hidden unless you click the palette icon to expand it.

I’ve also included an input field where users can enter a six-character hexadecimal value for a color, and a color swatch that displays the currently active color. The color palette is where we get the currentcolor variable that we’ve used in almost every lesson, but it’s only the end result of various uses of a variable called hexcolor that passes the hexadecimal value from the selected color to currentcolor in order to control the tools and the active color swatch.

©2014 About.com. All rights reserved.