回答編集履歴
1
間違え
test
CHANGED
@@ -4,13 +4,15 @@
|
|
4
4
|
|
5
5
|
const r = Math.round(Math.random() * 255);
|
6
6
|
|
7
|
-
|
7
|
+
const g = Math.round(Math.random() * 255);
|
8
8
|
|
9
|
-
|
9
|
+
const b = Math.round(Math.random() * 255);
|
10
10
|
|
11
|
-
|
11
|
+
colorBox.style.backgroundColor = `rgb(${r},${g},${b})`;
|
12
12
|
|
13
13
|
```
|
14
|
+
|
15
|
+
|
14
16
|
|
15
17
|
[参考元](https://sbfl.net/blog/2018/05/21/javascript-generate-better-color/#i-2)
|
16
18
|
|