我有这个使用RGB颜色选择的代码,我想知道如何使用RGB方法使JavaScript做随机颜色并在整个代码中记住它.
编辑:我试过这个:
var RGBColor1 = (Math.round, Math.random, 255)
var RGBColor2 = (Math.round, Math.random, 255)
var RGBColor3 = (Math.round, Math.random, 255)
但它不起作用.请帮忙!
编辑2:代码使用:g.fillStyle="rgba(R,G,B,0.2)";g.strokeStyle="rgba(R,G,B,0.3)";E();
字母代表RGB的颜色.
编辑3:这个问题的双打使用的是HEX值,而不是RGB值.