MCPcopy
hub / github.com/ecomfe/echarts-wordcloud / randomHslColor

Function randomHslColor

src/layout.js:386–396  ·  view source on GitHub ↗
(min, max)

Source from the content-addressed store, hash-verified

384 /* function for getting the color of the text */
385 var getTextColor;
386 function randomHslColor(min, max) {
387 return (
388 'hsl(' +
389 (Math.random() * 360).toFixed() +
390 ',' +
391 (Math.random() * 30 + 70).toFixed() +
392 '%,' +
393 (Math.random() * (max - min) + min).toFixed() +
394 '%)'
395 );
396 }
397 switch (settings.color) {
398 case 'random-dark':
399 getTextColor = function getRandomDarkColor() {

Callers 1

WordCloudFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected