As far as the keśa-avatāra (incarnation of a hair) is concerned, it is mentioned in Śrīmad-Bhāgavatam (SB 2.7.26). The Viṣṇu Purāṇa also states, ujjahārātmanaḥ keśau sita-kṛṣṇau mahā-bala.
Similarly, it is stated in the Mahābhārata (Adi-parva 189.31-32):
- sa cāpi keśau harir uccakarta
- ekaṁ śuklam aparaṁ cāpi kṛṣṇam
- tau cāpi keśāv āviśatāṁ yadūnāṁ
- kule striyau rohiṇīṁ devakīṁ ca
- tayor eko balabhadro babhūva
- yo ‘sau śvetas tasya devasya keśaḥ
- kṛṣṇo dvitīyaḥ keśavaḥ sambabhūva
- keśaḥ yo ‘sau varṇataḥ kṛṣṇa uktaḥ
Thus in Śrīmad-Bhāgavatam, the Viṣṇu Purāṇa and the Mahābhārata there are references to Kṛṣṇa and Balarāma being incarnations of a black hair and a white hair respectively. It is stated that Lord Viṣṇu snatched two hairs—one white and one black—from His head. These two hairs entered the wombs of Rohiṇī and Devakī, members of the Yadu dynasty. Balarāma was born from Rohiṇī, and Kṛṣṇa was born of Devakī. Thus Balarāma appeared from the first hair, and Kṛṣṇa appeared from the second hair. It was also foretold that all the asuras, who are enemies of the demigods, would be cut down by Lord Viṣṇu by His white and black plenary expansions and that the Supreme Personality of Godhead would appear and perform wonderful activities. In this connection, one should see the Laghu-bhāgavatāmṛta, the chapter called Kṛṣṇāmṛta, verses 156-164. Śrīla Rūpa Gosvāmī has refuted this argument about the hair incarnation, and his refutation is supported by Śrī Baladeva Vidyābhūṣaṇa’s commentaries. This matter is further discussed in the Kṛṣṇa-sandarbha (29) and in the commentary known as Sarva-saṁvādinī, by Śrīla Jīva Gosvāmī.