Highcharts test tool
HTML
<script src="https://code.highcharts.com/highcharts.js"></script>
<script src="https://code.highcharts.com/modules/exporting.js"></script>
<script src="https://cdn.jsdelivr.net/canvg/1.4.0/rgbcolor.js"></script>
<div id="container"></div>
CSS
#container {
min-width: 300px;
max-width: 800px;
height: 300px;
margin: 1em auto;
}
JavaScript
Highcharts.Color.prototype.parsers.push({
regex: /^[a-z]+$/,
parse: function (result) {
var rgb = new RGBColor(result[0]);
if (rgb.ok) {
return [rgb.r, rgb.g, rgb.b, 1]; // returns rgba to Highcharts
}
}
});
Highcharts.chart('container', {
title: {
text: 'Course Dropout Percentage'
},
colors: ['#900', '#500', '#1200', '#1200', '#700', '#300'],
xAxis: {
categories: ['2010', '2011', '2012', '2013', '2014', '2015',
'2016']
},
series: [{
data: [900, 500, 1200, 400, 700, 300],
type: 'bar',
colorByPoint: true
}]
});