summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoralecdwm2017-01-06 07:06:58 +0100
committeralecdwm2017-01-06 07:08:07 +0100
commitb044c2ae19e1cacf81524dad15739ea61f4479cb (patch)
tree624e9be02a8a7b10621dfbca8d7c177c36053408
parent01361afa7a739f05493ca4a718d6ce5ffe728bc4 (diff)
Use randomcolor not seedrandom for avatar backgrounds
Diffstat (limited to '')
-rw-r--r--lib/letter-avatars.js5
-rw-r--r--package.json1
2 files changed, 2 insertions, 4 deletions
diff --git a/lib/letter-avatars.js b/lib/letter-avatars.js
index e4d4f840..437e3e76 100644
--- a/lib/letter-avatars.js
+++ b/lib/letter-avatars.js
@@ -1,12 +1,11 @@
"use strict";
// external modules
-var seedrandom = require('seedrandom');
+var randomcolor = require('randomcolor');
// core
module.exports = function(name) {
- var colors = ["#5A8770", "#B2B7BB", "#6FA9AB", "#F5AF29", "#0088B9", "#F18636", "#D93A37", "#A6B12E", "#5C9BBC", "#F5888D", "#9A89B5", "#407887", "#9A89B5", "#5A8770", "#D33F33", "#A2B01F", "#F0B126", "#0087BF", "#F18636", "#0087BF", "#B2B7BB", "#72ACAE", "#9C8AB4", "#5A8770", "#EEB424", "#407887"];
- var color = colors[Math.floor(seedrandom(name)() * colors.length)];
+ var color = randomcolor({seed: name});
var letter = name.substring(0, 1).toUpperCase();
var svg = '<?xml version="1.0" encoding="UTF-8" standalone="no"?>';
diff --git a/package.json b/package.json
index e75f901e..4ef10312 100644
--- a/package.json
+++ b/package.json
@@ -99,7 +99,6 @@
"reveal.js": "^3.3.0",
"sequelize": "^3.24.3",
"scrypt": "^6.0.3",
- "seedrandom": "^2.4.2",
"select2": "^3.5.2-browserify",
"sequelize-cli": "^2.4.0",
"shortid": "2.2.6",