Mon 21 Jul 22:43:21 CEST 2025

This commit is contained in:
sbosse 2025-07-21 23:14:49 +02:00
parent 429f178e75
commit 7b5cbbc630

13
js/doc/maps/rainbow.js Normal file
View File

@ -0,0 +1,13 @@
var colors = Require('doc/colors');
module['exports'] = (function () {
var rainbowColors = ['red', 'yellow', 'green', 'blue', 'magenta']; //RoY G BiV
return function (letter, i, exploded) {
if (letter === " ") {
return letter;
} else {
return colors[rainbowColors[i++ % rainbowColors.length]](letter);
}
};
})();