I have colors in following format
backgroundColor: [
'rgba(255, 99, 132, 0.2)',
'rgba(54, 162, 235, 0.2)',
],
They are transparent colors, but when i convert them to this:
backgroundColor: [
getRandomColor(),
getRandomColor(),
],
They are not transparent anymore.
function getRandomColor() {
var letters = '0123456789ABCDEF';
var color = '#';
for (var i = 0; i < 6; i++ ) {
color += letters[Math.floor(Math.random() * 16)];
}
return color;
}
Can anyone help me please thanks.