Path: news.daimi.aau.dk!Morten.Grouleff From: Morten Grouleff Newsgroups: comp.lang.beta Subject: Re: colors Date: 06 May 1998 16:50:45 +0200 Organization: This posting is not sponsored by any organization. Lines: 28 Message-ID: References: <35505DA1.175C@tonno3.informatik.uni-dortmund.de> NNTP-Posting-Host: sunspot.daimi.aau.dk Mime-Version: 1.0 (generated by tm-edit 7.106) Content-Type: text/plain; charset=US-ASCII X-Newsreader: Gnus v5.5/Emacs 19.34 Xref: news.daimi.aau.dk comp.lang.beta:11561 pkb107 writes: > how can I use predefined colors or define colors on my own? there is a > color 'class' (integer red, green, blue), but what are the ranges for > these numbers ? what happens if my display only offers 256 (prolly > indexed) colors? will the compiler convert colors or will they be > adjusted at run-time ? 'Color' in guienv is just a tuple of 3 integers representing the (Red, Green, Blue) parts of the RGB value of the color. They are unsigned integers ranging 0 through 65535 (2^16-1). This should work for all platforms. The number of colours available depends on the platform, though. (# red,green,blue, white: @Color; do (65535, 0, 0) -> red; (0, 65535, 0) -> green; (0, 0, 65535) -> blue; (65535, 65535, 65535) -> white; #) If you prefer other representations of colors, take a look at Bifrost. Regards, -- ** Morten Grouleff ** ** Earthworm Jim PC: ** ** "Nick Nolte er ret god til at spille Ulf Pilgaard" **