Changed state logic. Added color gradient