score:26

Accepted answer

top level config can contain colors field. it's an array from which series colors will be picked.

see here.

here's working piece from my project

var chart;
$(document).ready(function () {
    chart = new highcharts.chart({
        chart:{
            renderto:'perfchart',
            type:'line',
            marginright:130,
            marginbottom:25
        },
        colors: ['#0000ff', '#0066ff', '#00ccff'],
        title:{
            text:'historical system performance',
            x:-20 //center
        },

appearance:

highcharts colors

score:3

see the code (and the plot that it renders) below.

the snippet below is a complete script--i.e., either put it in your markup between two script tags or as a stand-along js file with an includes in your markup.

colors is a chart object so the easiest way is to pass an array of colors (as hex strings):

 $(function () {
    var chart;
    $(document).ready(function() {
        chart = new highcharts.chart({
            chart: {
                renderto: 'container',
                type: 'line'
            },
            colors: ['#562f1e', '#af7f24', '#263249', '#5f7f90', '#d9cdb6'],
            title: {
               text: false
            },
            yaxis: {
                title: {
                    text: false
                }
           },
           series: [{
                name: 'series i',
                data: [17.4, 16.1, 19.45, 24.15, 28.44, 33.15, 37.2, 41.25, 43.3]
           },
           {
                name: 'series ii',
                data: [13.19, 17.23, 25.74, 28.5, 33.9, 35.62, 37.0, 36.6, 34.82]
           }
           ]
        });
    });
})

enter image description here

score:3

the color can be configured as part of the series. try something like this:

series: [
    {
        name: 'series i',
        color: '#ffffff',
        data: [17.4, 16.1, 19.45, 24.15, 28.44, 33.15, 37.2, 41.25, 43.3]
    }
];

Related Query

More Query from same tag