refactor setColor to change slot color