score:12

Accepted answer

Based on OP's comment, striked my previous answer.

As you are doing,

series.name = item; 

and

series.data.push(parseFloat(item));

Like wise, you can do,

series.color: '#f6f6f6'

(in your loop you can change color based your conditions )

You can do,

$(document).ready(function() {

    var options = {
        chart: {
            renderTo: 'container',
            defaultSeriesType: 'bar'
        },
        title: {
            text: 'Spiritual Gifts Results'
        },
        colors: [
            '#3BBEE3'
            ],
        xAxis: {
            categories: []
        },

        yAxis: {
            title: {
                text: 'Service'
            }
        },
        series: []
    };

    var data = document.getElementById("hdn_Data");
    // Split the lines
    if (data.value != "") {
        var lines = data.value.split('\n');

        // Iterate over the lines and add categories or series
        $.each(lines, function(lineNo, line) {
            var items = line.split(',');
            // header line containes categories
            if (lineNo == 0) {
                $.each(items, function(itemNo, item) {
                    if (itemNo > 0) options.xAxis.categories.push(item);
                });
            }
            // the rest of the lines contain data with their name in the first position
            else {
                var series = {
                    data: []
                };
                $.each(items, function(itemNo, item) {
                    var data = {};
                    if (itemNo == 0) {
                        series.name = item;
                    } else {
                        data.y = parseFloat(item);
                        if (itemNo <= 3) {
                            data.color = 'Gray';
                        }
                        else {
                            data.color = '#3BBEE3';
                        }
                        series.data.push(data);
                    }
                });
                options.series.push(series);
              }
            });

            // Create the chart
            var chart1 = new Highcharts.Chart(options);
        }
    });

Fiddle

Refer this, you can give data in 3 ways. I've used the third one.

score:2

Yes, In your push execution you should be able to set color for that point. I am not too familiar with push as we use a precompiled data object that we send. But inside of our .NET we set the color (if needed) on a particular point and then send the data object to the chart.

score:16

Here is a Example

data: [
  { y: 34.4, color: 'red'},   // this point is red
  21.8,                        // default blue
  {y: 20.1, color: '#aaff99'}, // this will be greenish
  20                           // default blue
]                             

Related Query

More Query from same tag