private static int BringIntInColorRange(int i) { if (i < 0) return 0; if (i > 255) return 255; return i; }