Checking light levels

Im in version 1.20.1 and want to make something only work if the light level is below level 7 is this possible with commands?
Continue to help post