# AS3 HTML color code to Flash (# to 0x)

**URL:** <https://forum.kirupa.com/t/as3-html-color-code-to-flash-to-0x/198781>\
**Category:** flash\
**Created:** [August 28, 2006, 4:25pm UTC](https://forum.kirupa.com/t/as3-html-color-code-to-flash-to-0x/198781 "2006-08-28T16:25:35Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![saxplayer13](https://avatars.discourse-cdn.com/v4/letter/s/ee7513/32.png) [@saxplayer13](https://forum.kirupa.com/u/saxplayer13)\
**Post date:** [August 28, 2006, 4:25pm UTC](https://forum.kirupa.com/t/as3-html-color-code-to-flash-to-0x/198781/1 "2006-08-28T16:25:35Z")

</div>

Question:  
Is there a simple way to change a string hexadecimal color value… eg.

```auto
var fillColor: String = "#ff0000";

```

I want to be able to change it to the flash equivalent (which can still be a string, not necessarily a uint)

```auto
var fillColor: String = "0xff0000";

```

I tried fillColor.replace(); but I’m not quite sure how to do it. Any tips welcome, as I’m not very familiar with string manipulation in AS3.

Thanks,  
Saxplayer13
