Select to view content in your preferred language

How do I use an ArcGIS color scheme in Python?

182
1
3 weeks ago
Labels (2)
GraceKowalski
New Contributor II

Hello! I am using ArcGIS Pro version 3. something. I also have Python version 3. something. I was using the "Bathymetric Scale" color scheme from ArcGIS for making IDW maps. I am now making maps in Python that I want to have the exact same colormap as these maps I made previously. Specifically, I am using Basemap in Python. Is there a way to make a list of the RGB values so I can make a colormap using matplotlib? Or is there a matching colormap in Python? How can I use the "Bathymetric Scale" for my Basemap maps?

Tags (2)
0 Kudos
1 Reply
DanPatterson
MVP Esteemed Contributor

It can be accessed

import arcpy
p = arcpy.mp.ArcGISProject("CURRENT")
colorRamps = p.listColorRamps("Bathy*")  # do a partial wildcard
for i in colorRamps:
    print(i.name)

Bathymetric Scale
Bathymetry #1
Bathymetry #2
Bathymetry #3
Bathymetry #4
Bathymetry #5

... sort of retired...
0 Kudos