In Mandarin Chinese, 黑 (Pinyin: hēi 🔊 or hè) means “black”, “dark”, and, by extension, “night”, “secret”, “illegal”, “evil” and so on. It also means “to hack” (in computing), from 黑客 (hēikè), a phonetic rendering of English hacker.
Lawrence J. Howell writes in his Etymological Dictionary of Han/Chinese Characters:
The relevant bronzeware inscription form is 火 fire + an element combining a chimney along with specks representing soot → black/dark (soot).However, Wiktionary calls the above interpretation “erroneous” and says that 黑 is a pictogram of a person (人) with a tattooed face,
depicting penal tattooing (墨), one of the five punishments of ancient China.No, I don’t like this explanation at all. (Mind you, that was the least harsh punishment!)