Pushing colors to a set of text without changing the colors in the Subtitles Editor
indunil-amarasinghe opened this issue · comments
Dear Harvey,
Please be kind enough to tell me what is wrong in this code to set colors to a set of strings in the Subtitles editor. I want to make sure that the colors won't change.
If I can push the array using this plugin it would help but the attempts I did so far failed.
https://bossanova.uk/jexcel/v3/
var titlesArray = ["Subtitles", "Captions", "Chapters", "Description", "Interaction", "Metadata"];
var colors = ["orange", "yellow", "blue", "lime", "purple", "pink"];
for(var index = 0; index < subtitles.length; index++) {
var newArray = titlesArray.push("Subtitles", "Captions", "Chapters", "Description", "Interaction", "Metadata");
}
for(var colorIndex = 0; colorsIndex < titlesArray.length; colorsIndex++) {
/* var colorArray = colors.push("orange", "yellow", "blue", "lime", "purple", "pink"); */
$('#colorWindow').css('color', function(titleIndex) {
return colors[titleIndex % colors.length];
});
}
Any help would be greatly appreciated.
Kind regards,
Indunil Sanjeewa