use fixed colors
This commit is contained in:
12
src/bg.js
12
src/bg.js
@@ -39,14 +39,14 @@ var changeIcon = function(color, currentIcon, options) {
|
||||
};
|
||||
|
||||
var generateRandomColor = function(seed) {
|
||||
var selectColor = function (colorNum, colors) {
|
||||
if (colors < 1) {
|
||||
colors = 1; // defaults to one color - avoid divide by zero
|
||||
}
|
||||
return "hsl(" + (colorNum * (360 / colors) % 360) + ",100%,50%)";
|
||||
var colors = ['#e6194b', '#3cb44b', '#ffe119', '#0082c8', '#f58231', '#FFFFFF'];
|
||||
|
||||
var selectColor = function (colorNum) {
|
||||
console.log(colorNum, seed % colors.length, colors[seed % colors.length]);
|
||||
return colors[seed % colors.length]
|
||||
}
|
||||
|
||||
return selectColor(seed, 7);
|
||||
return selectColor(seed);
|
||||
};
|
||||
|
||||
var registerToTST = async function() {
|
||||
|
Reference in New Issue
Block a user