Let user choose colour in plotlyview

I would like to give my user the option to change the colour I display my soil in. Is there an option to let the user choose a colour visually? We are aware of the fact that a user can give a RGB colour code but that is not very intuitive and/or user friendly.

Hi Rutger,

What a great idea, currently it is indeed only possible to enter color values through RGB/HEX/string values.
This would definitely be very nice in terms of user friendliness, I will make an internal issue for this feature and add your use-case. I will also change this post to a feature-request to better track the issue.

We’ll keep you posted on that!

1 Like

An alternative way is to predefine several color scales, and make them available through a dropdown in the plotly figure. See Dropdown menus in Python


That’s a cool idea, I will definitely consider this as an alternative. If colourselect at some point does become an option within VIKTOR that would still be the perfect soulution :smiley:

Thank you!

If the graph is refreshing quickly enough you could also make three number fields (R, G and B) in your parametrization and have your app convert it to the RGB colour code that Plotly requires. Still not visual but at least more intuitive than having to enter the colour code directly, and because you have more or less immediate feedback it is quite easy for the user to play around until the right colour is found.

This is now also possible using the ColorField which is added in SDK v14: SDK v14 released πŸŽ‰

1 Like