# Float number in colorscale?

**URL:** <https://community.plotly.com/t/float-number-in-colorscale/41428>\
**Category:** 📊 Plotly Python\
**Created:** [June 22, 2020, 11:45pm UTC](https://community.plotly.com/t/float-number-in-colorscale/41428 "2020-06-22T23:45:06Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![JohnBarren](https://avatars.discourse-cdn.com/v4/letter/j/34f0e0/32.png) [@JohnBarren](https://community.plotly.com/u/JohnBarren)\
**Post date:** [June 22, 2020, 11:45pm UTC](https://community.plotly.com/t/float-number-in-colorscale/41428/1 "2020-06-22T23:45:07Z")

</div>

```auto
go.Figure(data=go.Scatter(x=[i for i in range(50)], 
                                     y=[0 for _ in range(50)],
                                     mode='markers',
                                     marker=dict(
                                         color=[i for i in range(50)],
                                         colorscale=[[0,'rgb(0,0,0)'], [1,'rgb(254.5,1.0,0)']],
                                         showscale=True)))

```

This piece of code shows a colorbar with yellow at the top. What’s going on? It will behave well if I change the `1.0` to `0.99` or `1.01` .

 ![newplot (1)](https://us1.discourse-cdn.com/flex024/uploads/plot/original/2X/2/2601a2f31ca9c8694128426304451186e8ed3215.png)

---

<div class="post-metadata">

**Author:** ![Emmanuelle](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/emmanuelle/32/7853_2.png) [@Emmanuelle](https://community.plotly.com/u/Emmanuelle)\
**Post date:** [June 23, 2020, 7:07am UTC](https://community.plotly.com/t/float-number-in-colorscale/41428/2 "2020-06-23T07:07:22Z")

</div>

Hi @JohnBarren thanks for reporting this weird behaviour. This might be a bug, so I’ve opened an issue in plotly.js [https://github.com/plotly/plotly.js/issues/4942](https://github.com/plotly/plotly.js/issues/4942) (you can register to this issue on github to be notified about further discussions).
