Luminosity–metallicity relation for stars on the lower main sequence