I'm working on programming a screen saver, coding in javaScript, and I want the lines that are drawn to be solid enough to be seen but transparent enough you can see a pattern emerge as it continues to draw I've got a random color generator working with hex colors and I've been trying to figure out how to set the transparency so that it isn't random but everything else is. is this possible? if so how?
here's what I've got as far as color generation...
function getRandomColor()
{
var letters = '0123456789ABCDEF';
var color = '#';
for (var i = 0; i < 6; i++)
{
color += letters[Math.floor(Math.random() * 16)];
}
return color;
}
Aucun commentaire:
Enregistrer un commentaire