# Treemap Coloring

**URL:** <https://community.plotly.com/t/treemap-coloring/44472>\
**Category:** 📊 Plotly Python\
**Created:** [September 2, 2020, 10:22pm UTC](https://community.plotly.com/t/treemap-coloring/44472 "2020-09-02T22:22:52Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![culpgrant21](https://avatars.discourse-cdn.com/v4/letter/c/ecccb3/32.png) [@culpgrant21](https://community.plotly.com/u/culpgrant21)\
**Post date:** [September 2, 2020, 10:22pm UTC](https://community.plotly.com/t/treemap-coloring/44472/1 "2020-09-02T22:22:52Z")

</div>

Dear Plotly Community,

I am struggling a little to color a treemap the way I would like it to be.

**TLDR: I would like to color multiple levels in a treemap**

Here is a sample of the data:

```auto
Office State Region Country Super Region All
office 1 IL Midwest US Central all
office 2 TX South US Central all

```

This goes for about 80 rows all with different regions, countries, and super regions.

Right now I have the Treemap coloring on Region with the color\_discrete\_map attribute:

> px.treemap(hierarchy\_df, path=[“All”,“Country”,“Super Region”,“Region”,“State”],  
> width = 1800, height = 800, color = “Region”,  
> color\_discrete\_map={‘(?)’:‘#0678D5’})

I do like that because Region is the area I want to draw the viewer’s eye too.

I am wondering if I can do the same coloring I did to Region to another level in the data (Super Region).

I tried using the color attribute twice but it is saying it can’t be repeated.

Best,
