# Chloropeth Maps - Incorrect Colours

**URL:** <https://community.plotly.com/t/chloropeth-maps-incorrect-colours/91787>\
**Category:** 📊 Plotly Python\
**Created:** [April 14, 2025, 4:02pm UTC](https://community.plotly.com/t/chloropeth-maps-incorrect-colours/91787 "2025-04-14T16:02:24Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![harsh95kj](https://avatars.discourse-cdn.com/v4/letter/h/e0b2c6/32.png) [@harsh95kj](https://community.plotly.com/u/harsh95kj)\
**Post date:** [April 14, 2025, 4:02pm UTC](https://community.plotly.com/t/chloropeth-maps-incorrect-colours/91787/1 "2025-04-14T16:02:24Z")

</div>

Hi All,

I am using Plotly Express Chloropeth maps to display values on map. The values range from 0 to 5 billion. When I display the map, the colours for each country is different to the color scale (Turbo) I am using.

I have tried finding solution everywhere but do not seem to find a solution.

Can you please help me.

Following is my code:

```auto
fig = px.choropleth(testData, locations='locationName', locationmode='country names', 
                    featureidkey="properties.name", color='valueCount', projection='equirectangular', 
                    labels={'locationName': 'Country', 'valueCount': 'Value (in £)'},
                    range_color=[int(minValue), int(maxValue)], color_continuous_scale='Turbo', 
                    hover_data={'valueCount': ':.1f'}) 
 fig.update_layout(hoverlabel=dict(bgcolor="white", font_color='black', 
                                   font_size=12, font_family="Segoe UI"), 
                                   margin={"r":0,"t":0,"l":0,"b":0}, 
                                   coloraxis_colorbar=dict(tickformat='.0f'))
 fig.update_geos(fitbounds="locations", visible=False)

```

I have cross-checked that all values are numerical for valueCount numerical.

---

<div class="post-metadata">

**Author:** ![ranknovice](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/ranknovice/32/31106_2.png) [@ranknovice](https://community.plotly.com/u/ranknovice)\
**Post date:** [April 15, 2025, 5:02pm UTC](https://community.plotly.com/t/chloropeth-maps-incorrect-colours/91787/2 "2025-04-15T17:02:55Z")

</div>

The color data must be integer or float in order to use a colorscale. Can you tell us what the data type is for the valueCount column in your dataframe? I see that in setting your range color you are casting the value as int which tells me that valueCount might be pandas type “object”.

Hope this helps
