Controlling LED brightness through digital potentiometer and a LED driver from ON Semiconductor. Link here (PDF)
Light-emitting diodes (LEDs) require a regulated current, and their brightness is proportional to the current that flows through them. Some LED drivers use an external resistor to set the LED current. A digital POT can replace a discrete resistor with the advantage of providing an adjustable value allowing the LED brightness to dynamically change. Most digital POT circuits have the ability to store permanently the resistor value in non-volatile memory.
from Dangerous Prototypes https://ift.tt/2XP6ljy