Would suggest add a small preview of what it is (for people this is just pure code)
Also i optimized your code a bit, as your self executing things all the time. using else if should speed up the time it takes for JS to check if its truthy or falsy.
also the JS can be optimized even further as this seems a bit sloppy written imo other then that great guide.
function change() {
if (seq == 6) {
b--;
if (b == 0) seq = 1;
} else if (seq == 5) {
r++;
if (r == 12) seq = 6;
} else if (seq == 4) {
g--;
if (g == 0) seq = 5;
} else if (seq == 3) {
b++;
if (b == 12) seq = 4;
} else if (seq == 2) {
r--;
if (r == 0) seq = 3;
} else if (seq == 1) {
g++;
if (g == 12) seq = 2;
}
changetext();
}