MapInfo Pro

 View Only
  • 1.  How to get R,G,B value for embedded colours

    Posted 21 days ago

    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
    ------------------------------


  • 2.  RE: How to get R,G,B value for embedded colours

    Employee
    Posted 19 days ago

    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
    ------------------------------