A method for controlling a lamp, - wherein the lamp comprises multiple channels, - wherein each channel represents a color component of the lamp, the method comprising: - selecting a transition time for the lamp to transition from a first color to a second color, - wherein the first color is associated with a first initial value of a first color component and with a second initial value of a second color component and - wherein the second color is associated with a first target value of the first color component and a second target value of the second color component; - wherein a first channel control signal value is arranged to control the intensity of the first color component and a second channel control signal value is arranged to control the intensity of the second color component; - determining a first rate of change for the first channel control signal value to transition from the first initial value to the first target value, the first rate of change based on the transition time and a difference between the first initial value and the first target value; - determining a second rate of change for the second channel control signal value to transition from the second initial value to the second target value, the second rate of change based on the transition time and a difference between the second initial value and the second target value; - linearly incrementing or decrementing the first channel control signal value at the first rate of change toward the first target value; - linearly incrementing or decrementing the second channel control signal value at the second rate of change toward the second target value, such that the first channel control signal value arrives at the first target value and the second channel control signal value arrives at the second target value substantially simultaneously; - modifying a frequency of a clock signal to form a first modified clock signal based on the transition time and the difference between the first initial value and the first target value and a second modified clock signal based on the transition time and the difference between the second initial value and the second target value, respectively. - wherein the lamp comprises multiple channels, - wherein each channel represents a color component of the lamp, - selecting a transition time for the lamp to transition from a first color to a second color, - wherein the first color is associated with a first initial value of a first color component and with a second initial value of a second color component and - wherein the second color is associated with a first target value of the first color component and a second target value of the second color component; - wherein a first channel control signal value is arranged to control the intensity of the first color component and a second channel control signal value is arranged to control the intensity of the second color component; - determining a first rate of change for the first channel control signal value to transition from the first initial value to the first target value, the first rate of change based on the transition time and a difference between the first initial value and the first target value; - determining a second rate of change for the second channel control signal value to transition from the second initial value to the second target value, the second rate of change based on the transition time and a difference between the second initial value and the second target value; - linearly incrementing or decrementing the first channel control signal value at the first rate of change toward the first target value; - linearly incrementing or decrementing the second channel control signal value at the second rate of change toward the second target value, such that the first channel control signal value arrives at the first target value and the second channel control signal value arrives at the second target value substantially simultaneously; - modifying a frequency of a clock signal to form a first modified clock signal based on the transition time and the difference between the first initial value and the first target value and a second modified clock signal based on the transition time and the difference between the second initial value and the second target value, respectively.