I have battery saver on on my phone and it still lights up the capacitive buttons.
if you go into display settings , there is option "battery saver brightness " if it is turned on , it will disable the light from buttons when battery saver mode is on , else if you turn it on ; it will not disable it in battery saver mode . and yes the light only works according to ambient light(if you are in a dark room, or there is not sufficient light source , the buttons will automatically turn on the light and vice versa(will turn of when you are in a bright, sufficient light.).
mine is set to on (actually its set to ON by default) , so whenever battery saver is turned on , it disabled the capacitive button light