回答編集履歴
1
間違え
answer
CHANGED
@@ -1,9 +1,10 @@
|
|
1
1
|
なんか自分の環境が悪いのかChart.jsの用意ができなったので未実証です。
|
2
2
|
> ```JavaScript
|
3
3
|
const r = Math.round(Math.random() * 255);
|
4
|
-
|
4
|
+
const g = Math.round(Math.random() * 255);
|
5
|
-
|
5
|
+
const b = Math.round(Math.random() * 255);
|
6
|
-
|
6
|
+
colorBox.style.backgroundColor = `rgb(${r},${g},${b})`;
|
7
7
|
```
|
8
|
+
|
8
9
|
[参考元](https://sbfl.net/blog/2018/05/21/javascript-generate-better-color/#i-2)
|
9
10
|
これ使えませんかね?...
|