# Convert number (0x000000) to css colour (#000000)

**URL:** <https://forum.kirupa.com/t/convert-number-0x000000-to-css-colour-000000/241626>\
**Category:** flash\
**Created:** [October 16, 2007, 10:59am UTC](https://forum.kirupa.com/t/convert-number-0x000000-to-css-colour-000000/241626 "2007-10-16T10:59:13Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![3stripe](https://avatars.discourse-cdn.com/v4/letter/3/48db29/32.png) [@3stripe](https://forum.kirupa.com/u/3stripe)\
**Post date:** [October 16, 2007, 10:59am UTC](https://forum.kirupa.com/t/convert-number-0x000000-to-css-colour-000000/241626/1 "2007-10-16T10:59:13Z")

</div>

I know this should be simple but I just can’t work out how to convert a number in a constants class (0x000000) to a colour that I can use inside a FONT tag (#000000)

I would just use CN.COLOUR\_BLACK.toString() and remove the first 2 characters, but the string is being returned as 0, not 000000.

Any suggestions?
