updates variables for brightness