# Get color value through variable

**URL:** <https://forum.kirupa.com/t/get-color-value-through-variable/132139>\
**Category:** Uncategorized\
**Created:** [December 23, 2004, 12:45pm UTC](https://forum.kirupa.com/t/get-color-value-through-variable/132139 "2004-12-23T12:45:30Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ssjogus](https://avatars.discourse-cdn.com/v4/letter/s/6a8cbe/32.png) [@ssjogus](https://forum.kirupa.com/u/ssjogus)\
**Post date:** [December 23, 2004, 12:45pm UTC](https://forum.kirupa.com/t/get-color-value-through-variable/132139/1 "2004-12-23T12:45:30Z")

</div>

hi!

i read the tutorial on this site abt changing the color values of an object, or of a movie clip. it is really nice explained, thanks. my question is:

how can i get the value of a color from a variable. if i click the button, some rgb value should be stored in a variable and through some function i should get it. i wrote the function something like this:

* * *

on (press) {  
var colorful = new Color("\_root.shapes");  
colorful.setRGB(myVariable);  
}

* * *

but it’s not working. can anyone help me?

ssjogus

\*\* i am a designer, so do not know much of action script !!

ssjogus
