How do I make my dome light fade away when you shut the door?

The current aircraft I am working on has a similar setup on one its the gauges to what I am envisioning for this dome light set up, I cant remember if it is parallel or series with the light.