rgba also works very nicely in combination with js. A few years ago I wrote a custom 404 page (I can’t use it now, since OpenBSD’s httpd doesn’t support them), that included a dialogue which changed it’s color 4 seconds, using this code:
var r = Math.round(Math.random() * 255),
g = Math.round(Math.random() * 255),
b = Math.round(Math.random() * 255);
cont.background = "rgba(" + r +"," + g + "," + b + ",0.5)";
cont.borderColor = "rgb(" + r +"," + g + "," + b + ")";
cont.color = "rgb(" + (255 - g) +"," + (255 - b) + "," + (255 - r) + ")";
Later on I found out that ints have a toString function that takes a base as an argument, so it isn’t really that incredible…
rgbaalso works very nicely in combination with js. A few years ago I wrote a custom 404 page (I can’t use it now, since OpenBSD’s httpd doesn’t support them), that included a dialogue which changed it’s color 4 seconds, using this code:Later on I found out that ints have a
toStringfunction that takes a base as an argument, so it isn’t really that incredible…