Temperature conpensated LED Drive
What you need is for the current to decrease linearly from a maximum at T&lt;= 25°C  with a certain slope. 

You can do this by adding just a few parts- a temperature sensor, part of a quad op-amp and a couple of resistors to the usual current sink arrangement- see below. The TMP36 temperature sensor (+10mV/°C output) is the only part that isn't extremely cheap and widely available. 







simulate this circuit &ndash; Schematic created using CircuitLab

RS senses the LED current giving about 800mV drop for 80mA LED current. 

R5/R6 set the temperature coefficient current slope given the +10mV/°C output of the TMP36 and Rs. 

R7 and R8 are a voltage divider that sets the current at a given temperature. 

However there is only flaw in the basic circuit- usually derating does not allow you to increase the current below 25°C ambient, for whatever reason. 

The TMP36 saturates at 0°C so the current will continue to increase for ambients between 25°C and 0°C, which may violate the specs. If that is a concern, you can add the optional 3rd amplifier and diode to force the output of the TMP36 to saturate at 250mV = 25°C. V4 (250mV) can be derived by splitting R7 into two resistors or by another divider. 

The buffer OA3 op-amp is necessary because the TMP36 is not good at sinking current. However that allows us to easily force the output to 250mV when desired.