ie. if the background is white the label textcolour should be white and vice versa
im using the following code bgDelta is always 0 and the colour varies but in case of white background the label colour is also white.
public Color IdealTextColor(Color bg)
{
int nThreshold = 105;
int bgDelta = Convert.ToInt32((bg.R * 0.299) + (bg.G * 0.587) + (bg.B * 0.114));
Color fColor = (105 - bgDelta < nThreshold) ? Color.Black : Color.White;
return fColor;
}