# PD\>flash comm\>flash, color transform problem

**URL:** https://forum.kirupa.com/t/pd-flash-comm-flash-color-transform-problem/153273
**Category:** flash
**Created:** [June 30, 2005, 11:00am UTC](https://forum.kirupa.com/t/pd-flash-comm-flash-color-transform-problem/153273 "2005-06-30T11:00:06Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![yashiharu](https://avatars.discourse-cdn.com/v4/letter/y/bb73d2/32.png) [@yashiharu](https://forum.kirupa.com/u/yashiharu)
#### Post date: [June 30, 2005, 11:00am UTC](https://forum.kirupa.com/t/pd-flash-comm-flash-color-transform-problem/153273/1 "2005-06-30T11:00:06Z")

</div>

here is my situation :  
i use PD to send the RGB values (R,G,B) to flash via flash communication server

what i have to do:  
convect RGB(R,G,B) value to hex RGB(0xRRGGBB)  
and change the color of the movieclip to such color in real-time.

so i try:  
+++++ on the 1st frame  
…  
…  
… //get RGB from color sent by PD  
r = colors[0];  
g = colors[1];  
b = colors[2];

TextR = "R = "+r;  
TextG = "G = "+g;  
TextB = "B = "+b;  
TextMsg = msg;

++++ setTransform …  
onClipEvent(enterFrame){  
var my\_color:Color = new Color(\_root.my\_mc);  
var myColorTransform:Object = { ra: 100, rb:\_root.r, ga: 100, gb:\_root.g, ba: 100, bb:\_root.b, aa: 100, ab: 0};  
my\_color.setTransform(myColorTransform);  
}

++++++++++BUT It doesn’t work, becoz :  
the color of 251,251,251 should be almost white but, it shows yellow  
all other color with same problem …

does anyone have experience on this matter?

how can i improve?
