RGB( 250, 238, 209 )
as my background color. Thanks.function RGB2cWebColor lparameters tnRed, tnGreen, tnBlue return right(trans(tnRed, '@0'),2)+; right(trans(tnGreen,'@0'),2)+; right(trans(tnBlue, '@0'),2) * or alternatively you can swap red an blue return right(trans(rgb(tnBlue,tnGreen,tnRed),'@0'),6)Below function makes conversion from either rgb(r,g,b) or r,g,b passed as parameters (note uses alternative swapping) :
function Color2Web lparameters tnRed, tnGreen, tnBlue if type('tnRed')='N' and ; type('tnGreen')='N' and ; type('tnBlue')='N' && Passed as separate r,g,b return right(transform(rgb(tnBlue,tnGreen,tnRed),'@0'),6) endif if type('tnRed')='N' && passed as rgb(r,g,b) tnBlue = int(tnRed/256^2)%256 tnGreen = int(tnRed/256^1)%256 tnRed = int(tnRed/256^0)%256 return Color2Web(tnRed, tnGreen, tnBlue) endif return 'FFFFFF' && Otherwise return default whiteCetin