Do the light transformation on javascript side.