MCPcopy Create free account
hub / github.com/MankaiHuang/screen-visualization / getRandomColor

Function getRandomColor

public/iframe/lib/js/commonFun.js:375–389  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

373 },
374 // 获取随机颜色
375 getRandomColor() {
376 const color = []
377 for (let i = 0; i < 20; i++) {
378 color.push({
379 normal: {
380 color: `rgb(${[
381 Math.round(Math.random() * 256),
382 Math.round(Math.random() * 256),
383 Math.round(Math.random() * 256)
384 ].join(',')})`
385 }
386 })
387 }
388 return color;
389 },
390 SSEBind() {
391 // 从SSE中获取数据
392 if (this.EventSource || !this.basicConfig.SSEServer) return;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected