MCPcopy
hub / github.com/FlowiseAI/Flowise / randomColor

Function randomColor

packages/ui/src/utils/genericHelper.js:802–813  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

800
801export const generateRandomGradient = () => {
802 function randomColor() {
803 var color = 'rgb('
804 for (var i = 0; i < 3; i++) {
805 var random = Math.floor(Math.random() * 256)
806 color += random
807 if (i < 2) {
808 color += ','
809 }
810 }
811 color += ')'
812 return color
813 }
814
815 var gradient = 'linear-gradient(' + randomColor() + ', ' + randomColor() + ')'
816

Callers 1

generateRandomGradientFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected