# Sequential colors

**URL:** https://forum.kirupa.com/t/sequential-colors/97508
**Category:** Uncategorized
**Created:** [December 23, 2003, 1:59pm UTC](https://forum.kirupa.com/t/sequential-colors/97508 "2003-12-23T13:59:30Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![norm1252003](https://avatars.discourse-cdn.com/v4/letter/n/977dab/32.png) [@norm1252003](https://forum.kirupa.com/u/norm1252003)
#### Post date: [December 23, 2003, 1:59pm UTC](https://forum.kirupa.com/t/sequential-colors/97508/1 "2003-12-23T13:59:30Z")

</div>

here is a script that allows a random color to be displayed, how do I alter the script to make it not random but, sequential from white through all the colors to black. Here is the script:

onEnterFrame = function () {  
myCol = Math.round(Math.random()\*Math.pow(6, 16));  
beginFill(myCol, 50);  
moveTo(100, 100);  
lineTo(200, 100);  
lineTo(200, 200);  
lineTo(100, 200);  
lineTo(100, 100);  
endFill();  
};

cheers,

norm125
