# Tween Color class not the color I expected

**URL:** <https://forum.kirupa.com/t/tween-color-class-not-the-color-i-expected/183235>\
**Category:** flash\
**Created:** [March 24, 2006, 9:24pm UTC](https://forum.kirupa.com/t/tween-color-class-not-the-color-i-expected/183235 "2006-03-24T21:24:45Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![kiwiupover](https://avatars.discourse-cdn.com/v4/letter/k/96bed5/32.png) [@kiwiupover](https://forum.kirupa.com/u/kiwiupover)\
**Post date:** [March 24, 2006, 9:24pm UTC](https://forum.kirupa.com/t/tween-color-class-not-the-color-i-expected/183235/1 "2006-03-24T21:24:45Z")

</div>

Here is the code for a gallery slide show I’m working on.

What I’m wanting is the background to change color with each gallery. To tween over a few seconds. I have not included the gallery images. Sorry

I don’t understand why the colors are so different from the what the hexadecimal colors I intended.

B2C3D0  
598479  
D16546

You have to go to the gallery button to see what I’m getting at.

Thanks for your help

kiwiupover

[http://www.missionadventures.co.nz/kiwiupover/gallery.fla](http://www.missionadventures.co.nz/kiwiupover/gallery.fla)

babyPic.onRelease = function() {  
\_parent.\_parent.\_parent.gotoAndPlay(“galleryBaby”);  
var colour:Color = new Color(\_parent.\_parent.\_parent.galleryBack);  
colour.getRGB(\_parent.\_parent.\_parent.galleryBack);  
var trans:Object = colour.getTransform();  
var rb:Tween = new Tween(trans, “rb”, Strong.easeOut, trans.rb, 0xB2, 3, true);  
var gb:Tween = new Tween(trans, “gb”, Strong.easeOut, trans.gb, 0xC3, 3, true);  
var bb:Tween = new Tween(trans, “bb”, Strong.easeOut, trans.bb, 0xD0, 3, true);  
rb.onMotionChanged = function():Void {  
colour.setTransform(trans)  
};  
};
