How can I change the brightness with a slider?

Any way to make it work backwards?