Page MenuHomePhabricator

MaterialColors.js
No OneTemporary

MaterialColors.js

'use strict';
const colors = require('material-ui/colors');
const murmur = require('murmurhash-js');
// Available material design colors
const availableColors = [
colors.red, colors.pink, colors.purple, colors.deepPurple,
colors.indigo, colors.blue, colors.lightBlue, colors.cyan,
colors.teal, colors.green, colors.lightGreen, colors.lime,
colors.yellow, colors.amber, colors.orange, colors.deepOrange,
colors.brown, colors.grey, colors.blueGrey
];
function generateColor(text) {
return availableColors[(murmur.murmur3(text) % availableColors.length)];
}
exports.generateColor = generateColor;

File Metadata

Mime Type
text/plain
Expires
Sat, Nov 23, 5:48 AM (1 d, 9 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3408860
Default Alt Text
MaterialColors.js (679 B)

Event Timeline