WORD RGBColor(BYTE Red, BYTE Green, BYTE Blue) { switch(BIT_PER_PIXEL) { case 15: return ((Red>>3)<<10)|((Green>>3)<<5)|(Blue>>3); case 16: return ((Red>>3)<<11)|((Green>>3)<<6)|(Blue>>3); default: return NULL; } } Написал: Д. Поляков