The wife of Zhūgě Liàng was the daughter of Huáng Chényàn, a local elite of Jīng province. According to a local history Xiāngyáng jì, annotated to the biographical entry for Zhūgě Liàng in the Sān Guó zhì:
Huáng Chéngyán was lofty and frank, open and direct, a famed elite south of the Miǎn, and said to Zhūgě Kǒngmíng: “I hear you are choosing a wife; I have an ugly daughter, yellow head and black complexion, but her talent can match yours.” Kǒngmíng agreed, and at once she was sent. At the time people laughed at this, those in the town making a proverb that said: “Don’t be Kǒngmíng in choosing a wife, it is only to obtain Ā'Chéng’s ugly daughter.”1
With Zhūgě Liàng becoming such a legend, naturally various legends have sprung up surrounding his wife based on this minor note, including invented personal names.2 By the Sòng dynasty there was a story being passed around the region south of the Miǎn river [where the Huáng family had been based] that the lady Huáng used some sort of “wooden men” machines to grind grain very quickly; Zhūgě Liàng was very impressed and had his wife teach him about its construction, which he later used to develop his own “wooden oxen” and “flowing horse” transport mechanisms.3 This story may only a local legend venerating a famed figure from the region (or it may even be true; we will never know for sure) but it is probably the basis for more modern portrayals of the lady Huáng as an engineer and inventor.4
At various points I’ve heard modern stories of the lady Huáng not actually being ugly, and the claims of her ugliness instead being spread by her father or by the lady herself to ensure her husband did not choose her for her looks. I have thus far not been able to find any “old” versions of this story (even Sān Guó Yǎnyì keeps her ugly5) so it may be a relatively recent story, or else any “old” versions did not catch on very much.6
For those who may be more interested in historiography over legend, the most interesting part of the marriage between Zhūgě Liàng and Huáng Chéngyàn's daughter is probably not about her reported ugliness or her possible engineering skills, but the view it gives us into the connections within the elite circles of the time.
As it turns out, the marriage of Zhūgě and Huáng meant that Zhūgě Liàng was within a few degrees of connection to the powerful Cài family and to Liú Biǎo, governor of all Jīng province. As the local history Xiāngyáng Qíjiù jì tells us:
At Hàn’s end, the various Cài were the most flourishing. Cài Fěng’s younger sister married Excellency Commandant Zhāng Wēn, his eldest daughter became Huáng Chéngyàn’s wife, and his youngest daughter became Liú [Biǎo] Jǐngshēng’s later wife, who was [Cài] Mào’s younger sister."7
In other words, Zhūgě Liàng’s father-in-law was a brother-in-law of Liú Biǎo and a nephew-in-law of Zhāng Wēn.
This is yet more evidence that pretty much all the elite families are related to one another in some way; the social world becomes rather small at the very top of society.
Hopefully this also clears up any potential misconceptions about Zhūgě Liàng’s social status. Though it is certainly possible he lived a relatively humble life during his time in Lóngzhōng in the Xiāngyáng area,8 he was probably still relatively well-off and definitely an accepted member of the social elite and gentry class.
Also, since I’ve seen it brought up a few times: the description of Huáng Chéngyàn's daughter having yellow head (hair) and black complexion is perfectly plausible. Skin color darkening from sun exposure inducing melanin production seems relatively well known already (“tanning”), but hair color is also determined by melanin production in the body,9 and therefore can also be influenced by things that influence melanin production, such as age, sun damage, and vitamin and nutrient deficiencies for hair as well as skin.10 The most obvious example of this is hair color loss, and though this is usually described as “whitening” or “graying,” it can also be described as “yellowing,” such as in the Shī jīng:
May you [live to] grow old and wealthy, yellow hair and wrinkled back11
It is perhaps worth noting that the fall of Hàn was a time of a societal collapse with resulting hunger and famine. Though the Huáng family was a social elite family, the fall of Hàn was so serious that even the Emperor and his personal entourage were going hungry at times.12
襄陽記曰:黃承彥者,高爽開列,為沔南名士,謂諸葛孔明曰:「聞君擇婦;身有醜女,黃頭黑色,而才堪相配。」孔明許,即載送之。時人以為笑樂,鄉里為之諺曰:「莫作孔明擇婦,止得阿承醜女。」
Though Ā'Chéng 阿承 is perhaps most obviously a diminutive of the full name Chéngyàn 承彥, the prefix 阿 ā used to indicate affection, there may be some wordplay involved: 阿承 could potentially be interpreted as a contraction for the term 阿諛奉承, which refers to a flattering sycophant. This may be an unintentional coincidence as the pronunciation of 阿 in the second term becomes ē instead of ā, but even if unintentional it still fits the story quite well, what with Chéngyàn indirectly flattering Zhūgě Liàng’s talents to convince him to marry his daughter.
The video game series Dynasty Warriors uses the name Yuèyīng 月英, though rather confusingly only gives the personal name without any family name, which can give the incorrect impression her family name is Yuè instead of Huáng.
范成大《桂海虞衡志》:沔南人相傳:諸葛公居隆中時,有客至,屬妻黃氏具麵,頃之麵至。侯怪其速,後潛窺之,見數木人斫麥,運磨如飛。遂拜其妻,求傳是術,後變其制爲木牛流馬。
Such as in Dynasty Warriors.
SGYY 117: 其母黃氏,即黃承彥之女也。母貌甚陋,而有奇才:上通天文,下察地理;凡韜略遁甲諸書,無所不曉。
Personally I greatly dislike stories of this flavor: if the moral of the story is that personal beauty is not that important, why is the story treating the women being “actually” beautiful as a “reward?”
《襄陽耆舊記》:漢末,諸蔡最盛。蔡諷,妹適太尉張溫;長女為黃承彥妻;小女為劉景升後婦,瑁之妹也。
We are told for instance that he lived in a “thatched cottage” and that he personally plowed his farm fields.
https://medlineplus.gov/genetics/understanding/traits/haircolor/
https://skinkraft.com/blogs/articles/how-to-increase-melanin-in-hair/
https://www.iflscience.com/plants-and-animals/why-your-hair-color-changes-as-you-age/
《詩經·魯頌·閟宮》俾爾壽而富、黃髮台背
SGZ 1: 是歲穀一斛五十餘萬錢,人相食,乃罷吏兵新募者。
Annotated to SGZ 1: 魏書曰:自遭荒亂,率乏糧穀。諸軍並起,無終歲之計,饑則寇略,飽則棄餘,瓦解流離,無敵自破者不可勝數。袁紹之在河北,軍人仰食桑椹。袁術在江、淮,取給蒲蠃。民人相食,州里蕭條。
Annotated to SGZ 6: 帝求米五斛、牛骨五具以賜左右,傕曰:「朝餔上飯,何用米為?」乃與腐牛骨,皆臭不可食。帝大怒,欲詰責之。