Changing palette and default color in Kibana

Hello,

for kibana-6.0.1-linux-x86_64

We would like to change the palette and the default color in the graphs.
We do not mind if we need to update the code everytime we update for the time being.
I updated:

  • ./src/ui/public/vis/components/color/seed_colors.js (changed the seedColor)
  • ./src/ui/public/vislib/components/color/colormaps.js (added a new palette)

I restarted Kibana, cleaned my browser cache, ...
The colors are the same as initially...
Would you have any idea?

Thank you very much
Arnaud

Hi @Arnaud_Jaspart,

which type of graph are you using (normal charts, timelion or time series visual builder)? When running Kibana after you made your changes, did you see a notice about optimization/bundling in the Kibana log?

I was able to change the default colors by manipulating the seed_colors.js file you indicated.

As a general note, when modifying the Kibana source it is advisable to use the source from https://github.com/elastic/kibana/tree/6.1 and to run Kibana in development mode to ensure proper compilation. When you are satisfied with your changes you can build your own installation bundle. Patching the code in a release might have unreliable side-effects. (See https://github.com/elastic/kibana/blob/6.1/CONTRIBUTING.md#setting-up-your-development-environment for more details on setting up the development environment and the build requirements.)

Another thing that could override your color mapping changes is the advanced setting visualization:colorMapping. You can check it in Kibana's management section.

1 Like

also as mentioned by Felix, you can look into visualization:colorMapping advanced setting. It is configured by default to map counts to blue. This indeed throws a lot of people off ( if its only showing a single color) even after all the changes. Do let us know if this works.

Cheers
Rashmi

Thank you Felix @weltenwort,
I tried visualization:colorMapping. It's good for general terms, like counts...
But for example, I have:

  • a donut with the default bright colors which I would like to change, as well as the palette
  • a USA heatmap which I would like to change to go from yellow to blue.

Changing the code directly from the deployed tar.gz doesn't seem to work.
I'll use the github and set up a devenv, if you think this is why I'm stuck with default colors. (?)

Thanks again for your help and support

Thanks @rashmi, tried it.
But does not answer heatmap and multi-layer donut (too many descriptors).

It might be that the changes to the source files are not incorporated into the browser bundle when the Kibana server is not running in devopment mode. Let us know if that still does not make a difference.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.