# Making a hexi value into a uint for beginFill

**URL:** <https://forum.kirupa.com/t/making-a-hexi-value-into-a-uint-for-beginfill/266214>\
**Category:** flash\
**Created:** [July 17, 2008, 9:13am UTC](https://forum.kirupa.com/t/making-a-hexi-value-into-a-uint-for-beginfill/266214 "2008-07-17T09:13:36Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![daidai](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/daidai/32/3087_2.png) [@daidai](https://forum.kirupa.com/u/daidai)\
**Post date:** [July 17, 2008, 9:13am UTC](https://forum.kirupa.com/t/making-a-hexi-value-into-a-uint-for-beginfill/266214/1 "2008-07-17T09:13:36Z")

</div>

Im using the kuler API to colour some parts of my site.  
The hexi vales recieved are in a 6 figure format (theHexi = 334422 for example). This works fine if I want to colour text, as I can convert the hexi to a String (like “0x” + theHexi ) and add the reference to the text format.color and it works fine. However if I want to colour using a beginFill(), I get stuck, as the value needed is a uint (the format.color value required is an Object). I have tried using parseInt (theHexi ) and parseInt (“0x” + theHexi ) but it just creates a grey fill. Does anyone know how make 334422 into 0x334422 with out turning it into a String first.  
Thanks.  
👁
