Use color key inside html, optimize the way of sending variables to class, refactor code, optimise code