Skip to content

Instantly share code, notes, and snippets.

@isaacarroyov
Created April 5, 2021 04:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save isaacarroyov/c1714afc5b972867688bbca5829f4dd5 to your computer and use it in GitHub Desktop.
Save isaacarroyov/c1714afc5b972867688bbca5829f4dd5 to your computer and use it in GitHub Desktop.
def get_color(feature):
value = map_dict.get(feature['id'])
if value is None:
return '#8c8c8c' # MISSING -> gray
elif value ==1 :
return '#DAF7A6'
elif value ==2 :
return '#FFC300'
elif value ==3 :
return '#FF5733'
elif value ==4 :
return '#C70039'
elif value ==5 :
return '#900C3F'
elif value ==6 :#
return '#581845'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment