Normally each character which is displayed in monitor hold two bytes. All characters are displayed in video buffer. Out of two bytes one byte holds the color code and other bytes hold the character.
Step-by-step explanation:
All color codes are marked from 0 to 255. Moreover all English ASCII characters are marks with 8 bits combination in bios.
All color codes are combines starts 0 to 255 and color codes given by RGB (red, green, blue) combines and color code generated.
So when we display a character in monitor first byte hold colours and second byte holds the character. These can be achieved by using peek b or peek function through c programming languages.