# How to increment hex color?

**URL:** https://forum.kirupa.com/t/how-to-increment-hex-color/262964
**Category:** flash
**Created:** [June 11, 2008, 2:00pm UTC](https://forum.kirupa.com/t/how-to-increment-hex-color/262964 "2008-06-11T14:00:52Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![activa](https://avatars.discourse-cdn.com/v4/letter/a/8491ac/32.png) [@activa](https://forum.kirupa.com/u/activa)
#### Post date: [June 11, 2008, 2:00pm UTC](https://forum.kirupa.com/t/how-to-increment-hex-color/262964/1 "2008-06-11T14:00:52Z")

</div>

I’d like to gradually increase the color of a clip from 0xFFFFFF to 0x000000. Is there any easy way to do this, or do I have to split the hex value as a string, increment each color, and then reassemble it?

---

<div class="post-metadata">

### Author: ![activa](https://avatars.discourse-cdn.com/v4/letter/a/8491ac/32.png) [@activa](https://forum.kirupa.com/u/activa)
#### Post date: [June 11, 2008, 2:33pm UTC](https://forum.kirupa.com/t/how-to-increment-hex-color/262964/2 "2008-06-11T14:33:39Z")

</div>

I thought this would do it:

var outlineColor:ColorTransform = new ColorTransform(.9,.9,.9,1,0,0,0,0);  
myContent.myOutline.transform.colorTransform = outlineColor;

But this makes it go from white to black???
