Added utility for generating random color
This commit is contained in:
parent
b719a2c391
commit
12e3c5653f
10
src/utilities.ts
Normal file
10
src/utilities.ts
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
export function generateRandomColor(): { r: number; g: number; b: number } {
|
||||||
|
const r = Math.random() * 255;
|
||||||
|
const g = Math.random() * 255;
|
||||||
|
const b = Math.random() * 255;
|
||||||
|
return {
|
||||||
|
r,
|
||||||
|
g,
|
||||||
|
b,
|
||||||
|
};
|
||||||
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user