MCPcopy Create free account
hub / github.com/NSPManager/NSPanelManager / generateRandomColor

Function generateRandomColor

docs/src/components/Label/index.tsx:14–21  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

12
13// Utility function to generate random colors
14const generateRandomColor = () => {
15 const letters = '0123456789ABCDEF';
16 let color = '#';
17 for (let i = 0; i < 6; i++) {
18 color += letters[Math.floor(Math.random() * 16)];
19 }
20 return color;
21};
22
23const Label = ({ value }) => {
24 // Determine the color for the label

Callers 1

LabelFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected