Board Thread:Support Requests - Getting Technical/@comment-27447138-20160825041140

I noticed the Steven Universe wiki has custom backgrounds for their infoboxes. Now at first I assumed it was a bunch of different themes, but then I noticed they were using hex colors, which led me to believe they are somehow using CSS (and perhaps JS) to allow someone to summon any color for the background color. I would like to know how to do this, as some messing around has not gotten me very far.

I'm not sure if this IS the Javascript that they use, but this is what I've run some tests on and it seems it may require CSS to work: /* Portable infoboxes colors */ (function{   var infobox = $('.portable-infobox');    if (infobox.length) {        var color = ,        classNames = infobox.attr('class').split(' ');        for (var i = 0; i < classNames.length; i++) {            if (classNames[i].indexOf('pi-theme-_') !== -1) {                color = classNames[i].replace('pi-theme-_', );                break;            }        }        if (color) {            infobox.css('border', '1px solid #' + color);            infobox.find('h2').css('background-color', '#' + color);        }    } });  