tags:

views:

893

answers:

1

I'm trying to create a simple interface to automate the creation of a flash twitter badge for a WordPress theme.

My question is this, on the twitter page which has a simple color customizer, the standard hex color codes are getting translated to something to be passed to the flash as a variable.

Can anyone shed any light on what that color code system is? And possibly how I might write a PHP function to translate a six-digit hex code into that system?

+1  A: 

They are passing the hex color value as decimal. E.g:

(16711680)base10 = (FF0000)base16 = (red)base-layman
(0)base10        = (0)base16      = (black)base-layman

You don't need any special magic in PHP as far as I can tell. This is a matter of representation and not of encoding.

Hope that helps!

dirkgently