Javascript parsing and random color generation