The blue (Nila) and red (Lohita) colour represent Purusha and Prakriti. Since both Prakriti and Purusha merge in him, he is called NilaLohita. Linga Purana 2.18 states it as:
नीलश्च लोहितश्चैव प्रधानपुरुषान्वयात् ।
स्कंदस्ते यतः शुक्ल तथा शुक्लमपैति च ।।
He is of both Blue and Red colour since both Pradhana and Purusha merge in him. Since the semen flows from him, he is known as Shukla.
In one of the incarnation (among many) through Lord Brahma, Lord Shiva comes in NilaLohita form. This is recorded even in Vedas. Atharvaveda describes it as:
व्रात्य आसीदीयमान एव स प्रजापतिं समैरयत् ।।
स प्रजापति: सुवर्णमात्मन्नपश्यत्तत्प्राजनयत् ।।
तदेकमभवत्तल्ललाममभवत्तन्महदभवत्तज्जेष्ठमभवत्तद्ब्रह्माभवत्तत्तपोऽभवत्तत्सत्यमभवत्तेन प्राजायत ।।
सोऽवर्धत स महानभवत्स महादेवोऽभवत् ।।
स देवानामीशां पर्यैत्स ईशानोऽभवत् ।।
स एकव्रात्योऽभवत्स धनुरादत्त तदेवेन्द्रधनुः ।।
नीलमस्योदरं लोहितं पृष्ठम् ।।
नीलेनैवाप्रियं भ्रातृव्यं प्रोर्णोति लोहितेन द्विषन्तं विध्यतीति ब्रह्मवादिनो वदन्ति ।। [Atharva Veda 15:1]
There was Vratya . He roused Prajapati to action. Prajapati beheld gold in himself and engendered it. That became unique, that became distinguished, that became great, that became excellent, that became Brahman, that became Tapas, that became Truth: through that he (Vratya) was born. He grew, he became great, he became Mahadeva. He gained the lordship of the Gods. He became Ishana. He became Eka Vratya. He held a bow, even that Bow of Indra. His front is dark-blue, his back is red (Nila Lohita). With dark-blue he envelops a detested rival, with red he pierces the man who hates him: so the knowers of Brahman say.
The same is described in 1.41 of Linga Purana as:
ललाटमस्य निर्भिद्य प्रादुरासीत्पितामहात् ।
लोहितोऽभूत्स्वयं नीलः शिवस्य हृदयोद्भव ।।
वह्रश्चैव तु संयोगात्प्रकृत्या पुरुषः प्रभुः ।
नीलश्च लोहितश्चैव यतः कालाकृतिः पुमान् ।।
नीललोहित ईत्युक्तस्तेन देवेन वै प्रभुः ।
All pervading lord born of body of Bhava, came out of Brahma by piercing his forehead. The lord who born of the heart of Shiva was originally blue but became red coming in contact with fire. It represents the form of combination of Prakriti and Purusha of the Lord. Because of the form with both blue and red colour resembling Kãla, Lord came to be known by the name NilaLohita.
Thus, the half blue half red form of Lord Shiva is known as NilaLohita. NilaLohita form of Lord Shiva actually denotes the combination of Purusha and Prakriti.