String str = "ABC"; //your original hex number,
//you said it was type "String", right?
int intStr = Convert.ToInt32(str, 16); //convert to decimal first
String binaryStr = Convert.ToString(intStr, 2); //then convert to binary
for(int i=0; i<binaryStr.Length; i++)
{
if(binaryStr[i].Equals("0")
//set color to white
else
//set color to black
}
String str = "ABC"; //your original hex number,
//you said it was type "String", right?
int intStr = Convert.ToInt32(str, 16); //convert to decimal first
String binaryStr = Convert.ToString(intStr, 2); //then convert to binary
for(int i=0; i<binaryStr.Length; i++)
{
if(binaryStr[i].Equals("0")
//set color to white
else
//set color to black
}