☰Read-only archive⌕
Looking for help with Bokeh?

This is a read-only archive. Ask questions and join the conversation on GitHub.

Visit Community Support on GitHub →
Archived discussions · Captured October 28, 2026

Color mapper with explicit coloring for extreme values

Community Support
noamnav
noamnav

Bokeh color mapping behaves as follows :

x < 0  : 'red'     # values < low are clamped
0 >= x < 33 : 'red'
33 >= x < 66 : 'green'
66 >= x < 99 : 'blue'
99 >= x      : 'blue'    # values > high are clamped

This is easy to implement and works as expected. However, is there a way to explicitly define a color for the clamped / extreme values which will be off the color mapping given? e.g:

x<0 : ‘black’
99>x: ‘white’

that is whilst keeping the cmapper for the middle range.

thanks

⌁   Link to post

End of archived discussion · Replies are disabled