title: [PHP]Converting RGB or HEX To "Long Int" Color
body: <p>Need to convert RGB or HEX colors to "Long Int" for another program that uses this format.  Not sure the specifics of the "Long Int" color format though.</p>
  
  <p>It is possible to generate the "Long Int" values manually using this color-picker <a href="http://hide-inoki.com/en/soft/chunter/index.html" rel="nofollow noreferrer">http://hide-inoki.com/en/soft/chunter/index.html</a> but a php function would be preferred.</p>
  
  <p>hexdec generates the correct "Long Int" for some HEX values ('FFFFFF', '2F2F2F') but not others ('123456').</p>