SMPTE
to generate a new and unique variation
Every variart piece is open source, you can see exactly how it is drawn from the code.
// A television test card: seven color bars, a reversed chroma strip,
// and a row of near-black reference patches.
var barCount = intVariable('bars', 4, 9);
var topShare = intVariable('topShare', 55, 80);
var bars = ['#c0c0c0', '#c0c000', '#00c0c0', '#00c000', '#c000c0', '#c00000', '#0000c0'];
var reverse = ['#0000c0', '#111111', '#c000c0', '#111111', '#00c0c0', '#111111', '#c0c0c0'];
var pluge = ['#00214c', '#ffffff', '#32006a', '#111111', '#070707', '#111111', '#1a1a1a', '#111111'];
var topHeight = height * (topShare / 100);
var midHeight = (height - topHeight) * 0.28;
var botTop = topHeight + midHeight;
function row(colors, y, h, n) {
var w = width / n;
for (var i = 0; i < n; i++) {
s.rect(i * w, y, w + 1, h).attr({fill: colors[i % colors.length]});
}
}
s.rect(0, 0, width, height).attr({fill: '#111111'});
row(bars, 0, topHeight, barCount);
row(reverse, topHeight, midHeight, barCount);
row(pluge, botTop, height - botTop, getRandomInt(barCount, barCount + 3));
Copyright © 2014–2026 Kevin Marsh. All rights reserved. Questions? Comments? hello@variart.io