public GetLightIndex ( |
||
info | ||
btnFaceValue | byte | |
highlightValue | byte | |
windowValue | byte | |
return | int |
public int GetLightIndex(ColorInfo info, byte btnFaceValue, byte highlightValue, byte windowValue)
{
int res = (btnFaceValue * info.BtnFaceColorPart) / 100 +
(highlightValue * info.HighlightColorPart) / 100 +
(windowValue * info.WindowColorPart) / 100;
if (res < 0)
res = 0;
if (res > 255)
res = 255;
return res;
}