CMY color in USGS polygons

Skip to first unread message


Dec 30, 2023, 1:30:27 AM12/30/23
to MapInfo-L
Is there a way to utilize CMY colors found in some USGS Geologic map products (only available as .shp) when converted to .tab?

The .shp file has Color_cmy field for each polygon.  Is there a way to Thematically map these colors to match ( or closely) match original USGS colors?  Alternatively is there a way to modify the region style to match these original colors?


Uffe Kousgaard

Dec 30, 2023, 2:42:49 AM12/30/23

Code for this task, could look like the one below. It assumes 3 seperate fields, with c, m and y values.
In the range 0-255. Adapt for your specific file format. Untested !!

Uffe Kousgaard

include "mapbasic.def"

dim obj as object
dim row as integer
Dim b_fillstyle As Brush

fetch first from mytable
row = 1
while not eot(mytable)
  obj = mytable.object
  b_fillstyle = makebrush(2,rgb(255-mytable.c, 255-mytable.m, 255-mytable.y),0)
  alter object obj Info OBJ_INFO_BRUSH, b_fillstyle

  update mytable
  set object = obj
  where rowid = row

  fetch next from mytable
  row = row+1
You received this message because you are subscribed to the
Google Groups "MapInfo-L" group.To post a message to this group, send
email to
To unsubscribe from this group, go to:
For more options, information and links to MapInfo resources (searching
archives, feature requests, to visit our Wiki, visit the Welcome page at

You received this message because you are subscribed to the Google Groups "MapInfo-L" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To view this discussion on the web visit


Dec 31, 2023, 6:48:42 PM12/31/23
to MapInfo-L
Thank you Uffe,
I'm unfamiliar with coding.  I'll look into using Mapbasic.
Cheers, Ike
Reply all
Reply to author
0 new messages