# Adjust Tone of Hex Color

**URL:** https://forum.kirupa.com/t/adjust-tone-of-hex-color/298278
**Category:** flash
**Created:** [October 15, 2009, 8:19pm UTC](https://forum.kirupa.com/t/adjust-tone-of-hex-color/298278 "2009-10-15T20:19:55Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![pardoner](https://avatars.discourse-cdn.com/v4/letter/p/5daacb/32.png) [@pardoner](https://forum.kirupa.com/u/pardoner)
#### Post date: [October 15, 2009, 8:19pm UTC](https://forum.kirupa.com/t/adjust-tone-of-hex-color/298278/1 "2009-10-15T20:19:55Z")

</div>

I’m starting off with two colors ( 0xa0b1cf, 0x000000 ) and 10 Shapes and I want to blend the colors from 0xa0b1cf to 0x000000 across all 10 Shapes. Is there a way to pragmatically increase the tone of a hex color?

somthing like:

var totalShapes = 10 // number of shapes

for (var i:int = 0; i \< totalShapes; i++) {  
var newColor = 0xa0b1cf + black // add back to this color until it is completely black at the end of the loop  
var shape:Shape = new Shape();  
shape.graphics.beginFill(newColor);  
shape.graphics.drawRect(0, 50\*i, 50, 50);  
shape.graphics.endFill();  
addChild(shape);  
}

Thanks
