A temperature-compensated light source, comprising: a light emitting diode, LED, configured to generate a radiant energy output in response to a first current applied to the LED, the LED having a characteristic that the radiant energy output decreases when ambient temperature increases and the first current (I LED) remains constant; a first current source configured to generate a second current (Is) that increases first order linearly when the ambient temperature increases; a second current source configured to generate a third current (I R) that is first order independent of the ambient temperature; a weighted current adder configured to produce a fourth current (I B) by summing up the second and third currents (I S, I R) multiplied with first and second weights (W S, W R) respectively, wherein the first and second weights (W S, W R) are adjustable; and a third current source configured to supply a temperature-compensated first current, responsive to the fourth current (I B), as the first current (I LED) to the LED; characterised in that the first current source includes: a bipolar transistor (Q 1) configured in forward mode, the bipolar transistor (Q 1) connected between a first node and a second node and configured to provide a first voltage potential (V BE) at the second node that decreases first order linearly when the ambient temperature increases, wherein the first node is grounded; a first resistor (R 3) coupled between the second node and a third node, a resistance value of the first resistor (R 3) being first order independent of the ambient temperature; an operational amplifier (X 1) having first and second input terminals and an output terminal, the first input terminal coupled to a second voltage potential (V 32) that is first order independent of the ambient temperature, the second input terminal coupled to the third node; a field effect transistor (M 3) with a gate terminal coupled to the output terminal of the operational amplifier (X 1), a source terminal coupled to the third node, and a drain terminal configured to provide a fifth current (I M3); and a current mirror coupled to the drain terminal of the field effect transistor (M 3) and configured to produce the second current (Is) in response to the fifth current. (I M3). a light emitting diode, LED, configured to generate a radiant energy output in response to a first current applied to the LED, the LED having a characteristic that the radiant energy output decreases when ambient temperature increases and the first current (I LED) remains constant; a first current source configured to generate a second current (Is) that increases first order linearly when the ambient temperature increases; a second current source configured to generate a third current (I R) that is first order independent of the ambient temperature; a weighted current adder configured to produce a fourth current (I B) by summing up the second and third currents (I S, I R) multiplied with first and second weights (W S, W R) respectively, wherein the first and second weights (W S, W R) are adjustable; and a third current source configured to supply a temperature-compensated first current, responsive to the fourth current (I B), as the first current (I LED) to the LED; characterised in that the first current source includes: a bipolar transistor (Q 1) configured in forward mode, the bipolar transistor (Q 1) connected between a first node and a second node and configured to provide a first voltage potential (V BE) at the second node that decreases first order linearly when the ambient temperature increases, wherein the first node is grounded; a first resistor (R 3) coupled between the second node and a third node, a resistance value of the first resistor (R 3) being first order independent of the ambient temperature; an operational amplifier (X 1) having first and second input terminals and an output terminal, the first input terminal coupled to a second voltage potential (V 32) that is first order independent of the ambient temperature, the second input terminal coupled to the third node; a field effect transistor (M 3) with a gate terminal coupled to the output terminal of the operational amplifier (X 1), a source terminal coupled to the third node, and a drain terminal configured to provide a fifth current (I M3); and a current mirror coupled to the drain terminal of the field effect transistor (M 3) and configured to produce the second current (Is) in response to the fifth current. (I M3). a bipolar transistor (Q 1) configured in forward mode, the bipolar transistor (Q 1) connected between a first node and a second node and configured to provide a first voltage potential (V BE) at the second node that decreases first order linearly when the ambient temperature increases, wherein the first node is grounded; a first resistor (R 3) coupled between the second node and a third node, a resistance value of the first resistor (R 3) being first order independent of the ambient temperature; an operational amplifier (X 1) having first and second input terminals and an output terminal, the first input terminal coupled to a second voltage potential (V 32) that is first order independent of the ambient temperature, the second input terminal coupled to the third node; a field effect transistor (M 3) with a gate terminal coupled to the output terminal of the operational amplifier (X 1), a source terminal coupled to the third node, and a drain terminal configured to provide a fifth current (I M3); and a current mirror coupled to the drain terminal of the field effect transistor (M 3) and configured to produce the second current (Is) in response to the fifth current. (I M3).