# Custom colors or color scales in heatmap

**URL:** <https://forum.knime.com/t/custom-colors-or-color-scales-in-heatmap/62142>\
**Category:** KNIME Analytics Platform\
**Created:** [February 20, 2023, 3:26pm UTC](https://forum.knime.com/t/custom-colors-or-color-scales-in-heatmap/62142 "2023-02-20T15:26:29Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![kolster](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/k/76d3ee/32.png) [@kolster](https://forum.knime.com/u/kolster)\
**Post date:** [February 20, 2023, 3:26pm UTC](https://forum.knime.com/t/custom-colors-or-color-scales-in-heatmap/62142/1 "2023-02-20T15:26:29Z")

</div>

Dear Forum,

I’m using the JFreeChart Heatmap node a lot, but I’m struggling to make the following:

1. a 3-color color scales as it is possible in e.g. excel, e.g. from green → yellow → red.
2. Custom colors of text or numbers as in conditional formatting in excel, e.g. “Tomato” → red, “Cucumber” → green, “others” → purple etc.

Could anyone point me into the right direction on these topics, please? Would be highly appreciated.  
Best,  
Lars

---

<div class="post-metadata">

**Author:** ![ScottF](https://forum-cdn.knime.com/user_avatar/forum.knime.com/scottf/32/61316_2.png) [@ScottF](https://forum.knime.com/u/ScottF)\
**Post date:** [February 20, 2023, 7:38pm UTC](https://forum.knime.com/t/custom-colors-or-color-scales-in-heatmap/62142/2 "2023-02-20T19:38:42Z")

</div>

Have you tried the Javascript-based [Heatmap](https://kni.me/n/COGxzLUJHkFE4Aer) node instead? It allows you to set colors on its _View Configuration_ tab.

---

<div class="post-metadata">

**Author:** ![kolster](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/k/76d3ee/32.png) [@kolster](https://forum.knime.com/u/kolster)\
**Post date:** [February 27, 2023, 10:10am UTC](https://forum.knime.com/t/custom-colors-or-color-scales-in-heatmap/62142/3 "2023-02-27T10:10:18Z")

</div>

Hi Scott,

Thanks, yes, I have also tried the Heatmap node. I’d like to have the output as colors only, but I can’t seem to remove the row-ID and other labels. Do you know if there is way to control that? Can’t seem to find that option…

---

<div class="post-metadata">

**Author:** ![ScottF](https://forum-cdn.knime.com/user_avatar/forum.knime.com/scottf/32/61316_2.png) [@ScottF](https://forum.knime.com/u/ScottF)\
**Post date:** [February 27, 2023, 4:29pm UTC](https://forum.knime.com/t/custom-colors-or-color-scales-in-heatmap/62142/4 "2023-02-27T16:29:20Z")

</div>

I don’t believe the feature you mention is currently supported - apologies for that.

---

<div class="post-metadata">

**Author:** ![kolster](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/k/76d3ee/32.png) [@kolster](https://forum.knime.com/u/kolster)\
**Post date:** [February 28, 2023, 7:43am UTC](https://forum.knime.com/t/custom-colors-or-color-scales-in-heatmap/62142/5 "2023-02-28T07:43:42Z")

</div>

Thanks again, ScottF. Then I guess it was not because I could not find that option.  
Think it could be solved for my application by exporting the heatmap as image and cropping a number of pixels from left and top. Any hints in how to do that?

---

<div class="post-metadata">

**Author:** ![ScottF](https://forum-cdn.knime.com/user_avatar/forum.knime.com/scottf/32/61316_2.png) [@ScottF](https://forum.knime.com/u/ScottF)\
**Post date:** [February 28, 2023, 7:32pm UTC](https://forum.knime.com/t/custom-colors-or-color-scales-in-heatmap/62142/6 "2023-02-28T19:32:57Z")

</div>

The [Image Writer (Port)](https://kni.me/n/2uLHdG65k5PHXCbF) node could be used to export the heatmap you generated. After some additional manipulation, I believe you could then use the [Image Cropper](https://kni.me/n/VfTS9eDQP7CdwkBf) to tweak the image further, but I must confess to not being that experienced with the Image Processing extension.

Does that help?

---

<div class="post-metadata">

**Author:** ![system](https://forum-cdn.knime.com/uploads/default/original/1X/ab3ccf34482a0329361734a18199390177204f15.png) [@system](https://forum.knime.com/u/system)\
**Post date:** [May 29, 2023, 7:33pm UTC](https://forum.knime.com/t/custom-colors-or-color-scales-in-heatmap/62142/7 "2023-05-29T19:33:16Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
