# Quick Help with random color

**URL:** <https://forum.kirupa.com/t/quick-help-with-random-color/176023>\
**Category:** flash\
**Created:** [January 19, 2006, 6:03pm UTC](https://forum.kirupa.com/t/quick-help-with-random-color/176023 "2006-01-19T18:03:27Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![skyler](https://avatars.discourse-cdn.com/v4/letter/s/ecae2f/32.png) [@skyler](https://forum.kirupa.com/u/skyler)\
**Post date:** [January 19, 2006, 6:03pm UTC](https://forum.kirupa.com/t/quick-help-with-random-color/176023/1 "2006-01-19T18:03:27Z")

</div>

one of the tutorials give this code for random color

in an example with a movieClip with the name of myClip

how would you make it change color. This should be really easy for most of you, and should be for me too… but for some reason, i cant get it to work.

Heres the code:

```auto
myColor = Math.round( Math.random()*0xFFFFFF );
myColoredObject = new Color (_root.square);
myColoredObject.setRGB(myColor);

```

//sky

ultra High props to first person to answer this!!!
