# Is it possible to set custom colors for annotated brain regions when accessing an atlas brain image via the API?

**URL:** <https://community.brain-map.org/t/is-it-possible-to-set-custom-colors-for-annotated-brain-regions-when-accessing-an-atlas-brain-image-via-the-api/1549>\
**Category:** Technical\
**Created:** [March 31, 2022, 1:01pm UTC](https://community.brain-map.org/t/is-it-possible-to-set-custom-colors-for-annotated-brain-regions-when-accessing-an-atlas-brain-image-via-the-api/1549 "2022-03-31T13:01:34Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![sebjames](https://yyz1.discourse-cdn.com/flex027/user_avatar/community.brain-map.org/sebjames/32/144_2.png) [@sebjames](https://community.brain-map.org/u/sebjames)\
**Post date:** [March 31, 2022, 1:01pm UTC](https://community.brain-map.org/t/is-it-possible-to-set-custom-colors-for-annotated-brain-regions-when-accessing-an-atlas-brain-image-via-the-api/1549/1 "2022-03-31T13:01:34Z")

</div>

Hello,

I can download an Atlas image with annotations. For example, this one is from the 2017 P56 Mouse brain:

[http://api.brain-map.org/api/v2/atlas\_image\_download/576988729?downsample=3&annotation=true](http://api.brain-map.org/api/v2/atlas_image_download/576988729?downsample=3&annotation=true)

 ![imagefile(9)](https://canada1.discourse-cdn.com/flex027/uploads/brainobservatory/original/1X/af9f86acec8cace18626f67fe9d7de1ca5c3723a.jpeg)

My quesion is: Can I, via the API (or if not, by any other method) choose the colors that the different brain regions will be rendered?

In the example image, the VlSp, VlSpl and VLSpor regions of the cortex are all rendered in a dark green. I’d like to be able to have those rendered in different colors.

Thanks!

Seb James

---

<div class="post-metadata">

**Author:** ![lydian](https://yyz1.discourse-cdn.com/flex027/user_avatar/community.brain-map.org/lydian/32/174_2.png) [@lydian](https://community.brain-map.org/u/lydian)\
**Post date:** [March 31, 2022, 3:55pm UTC](https://community.brain-map.org/t/is-it-possible-to-set-custom-colors-for-annotated-brain-regions-when-accessing-an-atlas-brain-image-via-the-api/1549/2 "2022-03-31T15:55:22Z")

</div>

Hi Seb,

Those images are pre-rendered so colors cannot be changed.

---

<div class="post-metadata">

**Author:** ![sebjames](https://yyz1.discourse-cdn.com/flex027/user_avatar/community.brain-map.org/sebjames/32/144_2.png) [@sebjames](https://community.brain-map.org/u/sebjames)\
**Post date:** [March 31, 2022, 4:06pm UTC](https://community.brain-map.org/t/is-it-possible-to-set-custom-colors-for-annotated-brain-regions-when-accessing-an-atlas-brain-image-via-the-api/1549/3 "2022-03-31T16:06:19Z")

</div>

Thanks for the clarification Lydia. I can post-edit the images to change the colors manually - that will work (it’ll be tedious, but I’ll only have to do it once).

---

<div class="post-metadata">

**Author:** ![lydian](https://yyz1.discourse-cdn.com/flex027/user_avatar/community.brain-map.org/lydian/32/174_2.png) [@lydian](https://community.brain-map.org/u/lydian)\
**Post date:** [April 1, 2022, 3:19pm UTC](https://community.brain-map.org/t/is-it-possible-to-set-custom-colors-for-annotated-brain-regions-when-accessing-an-atlas-brain-image-via-the-api/1549/4 "2022-04-01T15:19:47Z")

</div>

From the API, you can download SVG where you can change code by code. However, the text layer is only the pre-rendered images.

---

<div class="post-metadata">

**Author:** ![sebjames](https://yyz1.discourse-cdn.com/flex027/user_avatar/community.brain-map.org/sebjames/32/144_2.png) [@sebjames](https://community.brain-map.org/u/sebjames)\
**Post date:** [April 1, 2022, 3:59pm UTC](https://community.brain-map.org/t/is-it-possible-to-set-custom-colors-for-annotated-brain-regions-when-accessing-an-atlas-brain-image-via-the-api/1549/5 "2022-04-01T15:59:26Z")

</div>

Ah, that’s a good idea. I have some code to modify .svg files already, so that could be quite easy.
