From: "Anders Clerwall" Newsgroups: comp.os.msdos.djgpp Subject: Colors Date: Wed, 11 Feb 1998 16:11:15 +0100 Organization: OMGIM Productions Lines: 13 Message-ID: <887209728.858627@nn1> NNTP-Posting-Host: nn1.swip.net Cache-Post-Path: nn1!s-319918 AT dialup109-10-10 DOT swipnet DOT se To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk Hi,, I have tried to convert rgb values to a color value in 800x600 (64k cols) using the formula: (r << 11) | (g << 5) | b; what's wrong?!.. when I put in for example the rgb values 60,60, 60.. the pixel on the screen is blue!.. it should be white, no? what's the correct formula (i read the vesainfo struct for the rgb positions, just if you wondered).. Thanks a mil! // Anders Clerwall (anders DOT clerwall AT swipnet DOT se)