late 14c., "blood-red, of a blood-red color" (late 12c. as a surname), from Old French sanguin (fem. sanguine) and directly from Latin sanguineus "of blood," also "bloody, bloodthirsty," from sanguis (genitive sanguinis) "blood" (see sanguinary).
The meaning "cheerful, hopeful, vivacious, confident" is attested by c. 1500, because these qualities were thought in old medicine to spring from an excess or predominance of blood as one of the four humors. The sense of "of or pertaining to blood" (mid-15c.) is rare.
Also in Middle English as a noun, a type of red cloth (early 14c.). It sometimes was used in the senses now going with sanguinary.
word-forming element making abstract nouns from adjectives and meaning "condition or quality of being ______," from Middle English -ite, from Old French -ete (Modern French -ité) and directly from Latin -itatem (nominative -itas), suffix denoting state or condition, composed of -i- (from the stem or else a connective) + the common abstract suffix -tas (see -ty (2)).
Roughly, the word in -ity usually means the quality of being what the adjective describes, or concretely an instance of the quality, or collectively all the instances; & the word in -ism means the disposition, or collectively all those who feel it. [Fowler]
<a href="https://www.etymonline.com/word/sanguinity">Etymology of sanguinity by etymonline</a>
Harper, D. (n.d.). Etymology of sanguinity. Online Etymology Dictionary. Retrieved $(datetime), from https://www.etymonline.com/word/sanguinity