variant of 暗[an4]
Phonosemantic compound. 日 represents the meaning and 音 represents the sound.
《說文》:“暗,日無光也。从日,音聲。”