Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F7159416
MaterialColors.js
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
679 B
Referenced Files
None
Subscribers
None
MaterialColors.js
View Options
'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
Details
Attached
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)
Attached To
Mode
rSYLKWRTCM Sylk WebRTC mobile
Attached
Detach File
Event Timeline
Log In to Comment