www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/02/11/13:30:35

From: "Anders Clerwall" <anders DOT clerwall AT swipnet DOT se>
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

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)



- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019