Link to home
Start Free TrialLog in
Avatar of dssisupport
dssisupport

asked on

Java script function to convert RGB to BV6 color

I have to store some color values in a sql table from a webpage and I need a function that will convert either RGB or HEX color values to the VB6 color format.
ASKER CERTIFIED SOLUTION
Avatar of GwynforWeb
GwynforWeb
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of dssisupport
dssisupport

ASKER

That is almost it but I need the VB Long format instead of 0xBBGGRR.
This is what I needed actually but you pointed me in the right direction. Thanks.

function toVBColor(r,g,b) {
   return (256 * 256 * b)   + g * 256 + r;