>The word appears in the Rigveda, where it means "colour, outward appearance, exterior, form, figure or shape".[4] The word means "color, tint, dye or pigment" in the Mahabharata.[4] Varna contextually means "colour, race, tribe, species, kind, sort, nature, character, quality, property" of an object or people in some Vedic and medieval texts.[4] Varna refers to four social classes in the Manusmriti.[4][5]
https://en.wikipedia.org/wiki/Varna_(Hinduism)
>The terms varna (theoretical classification based on occupation) and jāti (caste) are two distinct concepts. Jāti (community) refers to the thousands of endogamous groups prevalent across the subcontinent. A jati may be divided into exogamous groups based on the same gotras. The classical authors scarcely speak of anything other than the varnas; even Indologists sometimes confuse the two.[63]