score:84

Accepted answer
highcharts.setoptions({
 colors: ['#50b432', '#ed561b', '#dddf00', '#24cbe5', '#64e572', '#ff9655', '#fff263', '#6af9c4']
});

look the following example http://jsfiddle.net/8qufv/

score:0

highcharts.color(highcharts.getoptions().colors[0]).setopacity(0.5).get('rgba')]

in high charts inbuilt colors we have. so you need to change the path of the color[0] or [1]........[6]

score:1

highcharts.setoptions({
 colors: ['#333', '#cb2326', '#dddf00', '#24cbe5', '#64e572', '#ff9655', '#cb2326',      '#6af9c4']
});

score:1

is there a webpage that says to what each of the "colors" corresponds? all the answers here show something like:

colors: ['#333', '#cb2326', '#dddf00', '#24cbe5', '#64e572', '#ff9655', '#cb2326', '#6af9c4']

but what do #333, #cb2326, etc. actually change? obviously i can just change them and see what changes, but it would nice to have this reference available somewhere.

score:1

i had the same problem. in highcharts.css there's a section called "default colors". after i deleted this section, i could use custom colors. anyway, i guess you do not need highcharts.css if you use version v5.0.4 or higher.

score:2

to answer @loko web design's question https://stackoverflow.com/a/38794379/7475250

is there a webpage that says to what each of the "colors" corresponds? all the answers here show something like:

colors: ['#333', '#cb2326', '#dddf00', '#24cbe5', '#64e572', '#ff9655', '#cb2326', '#6af9c4']

but what do #333, #cb2326, etc. actually change? obviously i can just change them and see what changes, but it would nice to have this reference available somewhere.

the color docs are available here. although helpful they do not describe what changing a specific color actually does. below is my best description.

the colors prop gives highcharts the colors you would like the chart to loop through. for example if you had the following color prop.

colors: ['blue', 'green']

your pie slices would alternate between blue and green. changing blue to red your colors would then alternate between red and green. test it with the following fiddle

expanding the color list increases the number of colors before repeating.

colors: ['blue', 'green', 'yellow']

would repeat the colors if more than 4 slices are in your dataset.

score:7

i think what you need to do is set the colors using theme instead of setoptions as follows:

highcharts.theme = {colors: ['#50b432', '#ed561b', '#dddf00', '#24cbe5', 
                             '#64e572', '#ff9655', '#fff263', '#6af9c4']});

score:13

for those of you that prefer to initialize the color in the configs, you could simply put the colors in the plotoptions portion of the config object like so:

...,
plotoptions: {
  pie: {
   colors: [
     '#50b432', 
     '#ed561b', 
     '#dddf00', 
     '#24cbe5', 
     '#64e572', 
     '#ff9655', 
     '#fff263', 
     '#6af9c4'
   ],
   allowpointselect: true,
   cursor: 'pointer',
   datalabels: {
     enabled: false
   },
   showinlegend: true
 }
},
...

Related Query

More Query from same tag