<commit_before>/**
* @Author: gyanl, ananayarora, colllnwalkr
* @Date:   2016-10-03T09:56:56+05:30
* @Last modified by:   ananayarora
* @Last modified time: 2016-10-03T10:00:14+05:30
*/

var newColour = [];
var format = 'hex';
var currentColor = 0;
var numButtons = 6;

function changeColorFormat() {
    format = document.querySelector('input[type="radio"]:checked').value;
}

function genColor() {
    var a = "";
    for (var i = 0; i < 3; i++)
        a = a.concat(Math.floor(Math.random() * 255).toString(16));

    if (a.length < 6) {
        for (var i = 0; i < (6 - a.length); i++)
            a = "0" + a;
    }
    return "#" + a;
}

function changeColour(num) {
    if (num != -1) {
        currentColor = num;
        new_color = newColour[num];
        //outline();  either use the fn or just write the code here.
    } else {
        new_color = genColor();
        newColour.unshift(new_color);
        currentColor = 0;
        for (var i = 0; i < 6; i++) {
            var div_id = "c" + (i);
            document.getElementById(div_id).styrle.background = newColour[i];
            document.getElementById('c0').focus();
        }
    }
    updateUI(new_color);
}

function updateUI(color){
    if(color){
        document.body.style.backgroundColor = color;
        document.getElementById('clipboard').style.background = color;
        document.getElementById('generate').style.background = color;
        document.getElementById('copyall').style.background = color;
        document.getElementById('clipboard').setAttribute("data-clipboard-text", formatColor(color));
    }
}<commit_msg>fixed bug that broke changing style of background<commit_after>/**
* @Author: gyanl, ananayarora, colllnwalkr
* @Date:   2016-10-03T09:56:56+05:30
* @Last modified by:   ananayarora
* @Last modified time: 2016-10-03T10:00:14+05:30
*/

var newColour = [];
var format = 'hex';
var currentColor = 0;
var numButtons = 6;

function changeColorFormat() {
    format = document.querySelector('input[type="radio"]:checked').value;
}

function genColor() {
    var a = "";
    for (var i = 0; i < 3; i++)
        a = a.concat(Math.floor(Math.random() * 255).toString(16));

    if (a.length < 6) {
        for (var i = 0; i < (6 - a.length); i++)
            a = "0" + a;
    }
    return "#" + a;
}

function changeColour(num) {
    if (num != -1) {
        currentColor = num;
        new_color = newColour[num];
        //outline();  either use the fn or just write the code here.
    } else {
        new_color = genColor();
        newColour.unshift(new_color);
        currentColor = 0;
        for (var i = 0; i < 6; i++) {
            var div_id = "c" + (i);
            document.getElementById(div_id).style.background = newColour[i];
            document.getElementById('c0').focus();
        }
    }
    updateUI(new_color);
}

function updateUI(color){
    if(color){
        document.body.style.backgroundColor = color;
        document.getElementById('clipboard').style.background = color;
        document.getElementById('generate').style.background = color;
        document.getElementById('copyall').style.background = color;
        document.getElementById('clipboard').setAttribute("data-clipboard-text", formatColor(color));
    }
}
{'fraction_non_alphanumeric': 0.15502922177791448, 'fraction_numerical': 0.033220547523838816, 'mean_word_length': 2.6954545454545453, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2583305', 'n_tokens_mistral': 1116, 'n_tokens_neox': 1048, 'n_words': 235}