# Mathematical progression for a spectrum?

**URL:** <https://forum.kirupa.com/t/mathematical-progression-for-a-spectrum/238926>\
**Category:** flash\
**Created:** [September 17, 2007, 8:45am UTC](https://forum.kirupa.com/t/mathematical-progression-for-a-spectrum/238926 "2007-09-17T08:45:25Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jerryscript](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/jerryscript/32/451_2.png) [@Jerryscript](https://forum.kirupa.com/u/Jerryscript)\
**Post date:** [September 17, 2007, 8:45am UTC](https://forum.kirupa.com/t/mathematical-progression-for-a-spectrum/238926/1 "2007-09-17T08:45:25Z")

</div>

Does anyone know the math to create this type of spectrum?

![](http://www.geocities.com/webwizardsways/images/spectrum.jpg)

I’m using the F8 bitmap object and this image for a color preferences panel, and would like to use the same image for a fall-back to F7.

For F8, I’m using getPixel(), for F7 I’ll need to determine the color (or as close an approximation as possible) using the math used to create this type spectrum.

Anyone have any ideas?
