# Convert decimal to hexadecimal and vice versa

**URL:** https://forum.kirupa.com/t/convert-decimal-to-hexadecimal-and-vice-versa/323056
**Category:** flash
**Created:** [June 15, 2011, 10:15am UTC](https://forum.kirupa.com/t/convert-decimal-to-hexadecimal-and-vice-versa/323056 "2011-06-15T10:15:58Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![12abhi12](https://avatars.discourse-cdn.com/v4/letter/1/9f8e36/32.png) [@12abhi12](https://forum.kirupa.com/u/12abhi12)
#### Post date: [June 15, 2011, 10:15am UTC](https://forum.kirupa.com/t/convert-decimal-to-hexadecimal-and-vice-versa/323056/1 "2011-06-15T10:15:58Z")

</div>

I have started working with colors and have got a need for playing with hexadecimals.  
I tried making a variable which adds two hexadecimals, and it works but when I trace the answer, it comes out in decimals. How can I make it remain in hexadecimal or convert the decimal to hexadecimal?
