# Colortransform.color

**URL:** <https://forum.kirupa.com/t/colortransform-color/282173>\
**Category:** flash\
**Created:** [February 18, 2009, 4:25pm UTC](https://forum.kirupa.com/t/colortransform-color/282173 "2009-02-18T16:25:46Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![malidia](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/malidia/32/684_2.png) [@malidia](https://forum.kirupa.com/u/malidia)\
**Post date:** [February 18, 2009, 4:25pm UTC](https://forum.kirupa.com/t/colortransform-color/282173/1 "2009-02-18T16:25:46Z")

</div>

OK, so i think i am going crazy again and have spent way too much time on something simple, so please help my sanity.

below is some code that changes the tint of a movie clip on the stage with no problem, but my problem is i want to change a colors tint and store that color for later use to apply to dynamically created sprites, for some reason the code changes my place graphic as expect but when i draw a square using the Colortransform.color property the color always in gray scale??? i am so confused.

```auto

package{
    
    import flash.display.*;
    import flash.geom.*;
    
    public class ColorTinter extends MovieClip{
        public function ColorTinter():void{
            var tint = 127.5;
            
            var cT:ColorTransform = new ColorTransform();
            cT.color = 0xFF0000;
            

            cT.redOffset += tint;
            cT.greenOffset += tint; 
            cT.blueOffset += tint;
            
            square_mc.transform.colorTransform = cT;
            
            this.graphics.beginFill(cT.color, 1);
            this.graphics.drawRect(0, 0, 100, 100);
            this.graphics.endFill();

        }
    }
}

```

and here is source --\> [http://troyblank.com/temp/ColorTinter.zip](http://troyblank.com/temp/ColorTinter.zip)  
and here is swf --\>[http://troyblank.com/temp/ColorTinter.swf](http://troyblank.com/temp/ColorTinter.swf) (one on right is place square)
