# Dynamically creating Color Swatches

**URL:** https://forum.kirupa.com/t/dynamically-creating-color-swatches/257998
**Category:** flash
**Created:** [April 19, 2008, 11:59am UTC](https://forum.kirupa.com/t/dynamically-creating-color-swatches/257998 "2008-04-19T11:59:16Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![mastermode](https://avatars.discourse-cdn.com/v4/letter/m/e79b87/32.png) [@mastermode](https://forum.kirupa.com/u/mastermode)
#### Post date: [April 19, 2008, 11:59am UTC](https://forum.kirupa.com/t/dynamically-creating-color-swatches/257998/1 "2008-04-19T11:59:16Z")

</div>

So, I have to do this drawing application, and I want to integrate almost as much colors as Flash has, in it’s standard swatch picking thingy, i.e 18x12 = 216 swatches. In other words, A LOT of them 🙂

The only idea I’ve come up with is creating an array of colors, but…this requires me to note down 216 different hexa codes and then writing them into an array. I may be lazy, but this sounds really tedious and annoying, really.

Is there a way to work around this hard-coding session? If not, I’d better get moving 🙂

Thanks for reading, and Cheers!
