Use this way:
rgbcode= styleattr(objectinfo(selection.obj,2),2)
compr = rgbcode \ 65536
print "R = " +str$(compr)
compg=(rgbcode – compr * 65536) \ 256
print "G = " +str$(compg)
print "B = " +str$(rgbcode - compr * 65536 - compg * 256)
I found this explanation here: Colors and MapInfo written by Jacques Paris back in 2002
------------------------------
Peter Horsbøll Møller
Principal Presales Consultant | Distinguished Engineer
Precisely | Trust in Data
------------------------------
Original Message:
Sent: 10-29-2025 01:14
From: Dhanushka Sandanuwan
Subject: How to get R,G,B value for embedded colours
Dear All,
I have a MapInfo file where the colours are embedded as follows. I want to know the R,G,B colour code for each attribute in order to configure a web application. How can I do that?

------------------------------
Thanks & Regards
Dhan
VIC, Australia
------------------------------