Why the rgba isn't producing random colors here ?? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
22nd Oct 2018, 6:31 AM
Sumit Cheran
Sumit Cheran - avatar
4 Answers
+ 9
Line 40. You were using string literals instead of variables. Instead, do: c.strokeStyle = "rgba("+r+","+g+","+b+","+o+")";
22nd Oct 2018, 7:30 AM
Hatsy Rei
Hatsy Rei - avatar
+ 5
you have to make sure rgb out puts correctly. do this below..it fixes it ( i left the o out because not sure what o does) c.strokeStyle = "rgb("+r+","+g+","+b+")";
22nd Oct 2018, 7:42 AM
Jason Kennedy
+ 1
didnt see hatsy reply sorry for redundancy. but it did take me 20 mins to figure it out lol so theres that
22nd Oct 2018, 8:00 AM
Jason Kennedy
0
yeah... it's wrkin nw..thnx
22nd Oct 2018, 7:43 AM
Sumit Cheran
Sumit Cheran - avatar