teratail header banner
teratail header banner
質問するログイン新規登録

回答編集履歴

1

間違え

2019/06/04 11:00

投稿

退会済みユーザー
answer CHANGED
@@ -1,9 +1,10 @@
1
1
  なんか自分の環境が悪いのかChart.jsの用意ができなったので未実証です。
2
2
  > ```JavaScript
3
3
  const r = Math.round(Math.random() * 255);
4
- const g = Math.round(Math.random() * 255);
4
+ const g = Math.round(Math.random() * 255);
5
- const b = Math.round(Math.random() * 255);
5
+ const b = Math.round(Math.random() * 255);
6
- colorBox.style.backgroundColor = `rgb(${r},${g},${b})`;
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
  これ使えませんかね?...