# Color clade of phylogenetic tree

**URL:** <https://nextstrain.discourse.group/t/color-clade-of-phylogenetic-tree/737>\
**Category:** General\
**Created:** [September 21, 2021, 10:27pm UTC](https://nextstrain.discourse.group/t/color-clade-of-phylogenetic-tree/737 "2021-09-21T22:27:15Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mattoslmp](https://yyz1.discourse-cdn.com/flex031/user_avatar/nextstrain.discourse.group/mattoslmp/32/229_2.png) [@mattoslmp](https://nextstrain.discourse.group/u/mattoslmp)\
**Post date:** [September 21, 2021, 10:27pm UTC](https://nextstrain.discourse.group/t/color-clade-of-phylogenetic-tree/737/1 "2021-09-21T22:27:15Z")

</div>

Dear nextstrain team, how can I color the clades/emerging lineages which I have specified in the file clades.tsv in the phylogenetics tree?

For example, I tried included color.tsv in the my build.yml  
files:  
colors: /home/leandro/ncov/my\_profiles/md\_color/colors.tsv

color.tsv:

pango\_lineage B.1.1 #FF69B4  
pango\_lineage B.1.1.33 #A0522D  
pango\_lineage B.1.1.28 #2E8B57  
pango\_lineage P.2 #FFD700  
pango\_lineage P.1.2 #D2691E  
pango\_lineage P.1.4 #696969  
pango\_lineage P.1.7 #00FFFF  
pango\_lineage P.1.9 #F4A460  
pango\_lineage P.1.10 #4B0082

But not worked.

---

<div class="post-metadata">

**Author:** ![james](https://yyz1.discourse-cdn.com/flex031/user_avatar/nextstrain.discourse.group/james/32/11_2.png) [@james](https://nextstrain.discourse.group/u/james)\
**Post date:** [September 22, 2021, 11:00pm UTC](https://nextstrain.discourse.group/t/color-clade-of-phylogenetic-tree/737/2 "2021-09-22T23:00:06Z")

</div>

By default, we run a script which generates colours for a number of different pieces of metadata (clade\_membership, country, division, emerging\_lineage, location, pango\_lineage, recency, region). This script reflects a specific ordering of values, which we define in [defaults/color\_ordering.tsv](https://github.com/nextstrain/ncov/blob/master/defaults/color_ordering.tsv). That ordering includes the pango lineages in your message.

You can define a custom mapping of metadata to colours as per your `color.tsv`, however you have to include this in your `builds.yaml` such as

```auto
files:
  colors: my_profiles/md_color/colors.tsv

```

Please note that this will result in all the other custom colours generated by the above script are no longer used, and auspice will use a generic colour scale for these instead, which means that the ordering won’t be as nice! It will also mean that all pango lineages apart from the ones you define are grey.

If you want to keep our ncov-specific colours, but simply change the hex values for a few pango lineages, the easiest may be to write a small script to modify the dataset JSON to redefine them there.
