Can Xbrowse show Hex. Color codes

Can Xbrowse show Hex. Color codes

Postby Marc Venken » Wed Nov 08, 2017 11:57 pm

Hey,

Can Xbrowse show's a array/dbf with colorcodes in hex. Format like #4286f4

I need to show colors codes in Hex
Marc Venken
Using: FWH 23.04 with Harbour
User avatar
Marc Venken
 
Posts: 1447
Joined: Tue Jun 14, 2016 7:51 am
Location: Belgium

Re: Can Xbrowse show Hex. Color codes

Postby nageswaragunupudi » Thu Nov 09, 2017 12:31 am

Colors with notation like "#rrggbb" can be converted to normal RGB values with this function:
Code: Select all  Expand view  RUN
function X2RGB( cClr )

   local r  := HEXTONUM( SubStr( cClr, 2, 2 ) )
   local g  := HEXTONUM( SubStr( cClr, 4, 2 ) )
   local b  := HEXTONUM( SubStr( cClr, 6, 2 ) )

return nRGB( r, g, b )
 


For example, X2RGB( "#4286f4" ) --> 16025154
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10663
Joined: Sun Nov 19, 2006 5:22 am
Location: India


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 48 guests