# Evaluate color in Plot Cell

**URL:** <https://talk.observablehq.com/t/evaluate-color-in-plot-cell/6651>\
**Category:** Help\
**Created:** [June 3, 2022, 9:49am UTC](https://talk.observablehq.com/t/evaluate-color-in-plot-cell/6651 "2022-06-03T09:49:19Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![bianchi-dy](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.observablehq.com/bianchi-dy/32/5124_2.png) [@bianchi-dy](https://talk.observablehq.com/u/bianchi-dy)\
**Post date:** [June 3, 2022, 9:49am UTC](https://talk.observablehq.com/t/evaluate-color-in-plot-cell/6651/1 "2022-06-03T09:49:19Z")

</div>

[In my notebook, I plot a heatmap where each cell corresponds to each day of the year from 1990 to 2022](https://observablehq.com/d/0c8eb37cef53687b). I want to fill the cell color using a variable called `wb_color`, which contains a color name or hexcode.

I have tried using `d => d['wb_color']` and `wb_color` for the `fill` property but neither of these work. What notation should I use to map out the variable colors to the cell color?

---

<div class="post-metadata">

**Author:** ![Fil](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.observablehq.com/fil/32/207_2.png) [@Fil](https://talk.observablehq.com/u/Fil)\
**Post date:** [June 3, 2022, 10:36am UTC](https://talk.observablehq.com/t/evaluate-color-in-plot-cell/6651/2 "2022-06-03T10:36:58Z")

</div>

Judging from the notebook it seems to be working correctly?

Note that, if you want to make sure that the colors are passed “as is” and not considered as “non-color strings” that will introduce an ordinal scheme, you can specify` color: {type: "identity"}`.
