Short: Set front screen colours by hex or name Uploader: bq933@torfree.net (Chris Johnson) Author: Chris F.A. Johnson Type: cli/util Requires: Should work on any Amiga setrgb - Set colours of front screen USAGE: setrgb [options] nnrrggbb | nn-colour nn = 2-digit hexadecimal number of colour register (00 - FF) rr gg bb = 2-digit hexadecimal numbers for red green and blue -colour = name of colour from a file (default: s:rgb.txt) NOTE: There must be no space between the colour register, the hyphen, and the name of the colour. You may specify as many colour registers as you like on the command line, and the different types may be mixed. The order is not important. OPTIONS: --version - print version number and exit. --help, -h, -? print this information and exit -f filename - use filename for colour data instead of s:rgb.txt -v[v] verbose [more verbose] (The information printed with the verbose mode is rather cryptic. I put it in to help debug the program. I might make it more useful to the user at some future date.) setrgb version 1.0, Chris Johnson, 1999 EXAMPLES: setrgb 00FFFFFF 01000000 ; sets background to white and text to black setrgb 00-white 01-black ; same thing SetRGB reads the colour information from the command line, specifying either the RGB values, or a name which it reads from a file. The default filename is s:rgb.txt, but a different file can be specified with the -f option. Colours are named in rgb.txt using the format: rrr ggg bbb colourname where rrr, rgg, and bbb are positive integers less than 256. I have included a sample file, but there is a much larger file containing a few hundred colour specs. floating around (I think it may be in the Ghostscript package, among other places). e.g.: 0 0 0 black 255 255 255 white I have successfully tested SetRGB on an A3000 with OS3.1 and an A2000 with 2.04. (I can't find a kickstart disk to try it on my A1000.) SetRGB tries to open a graphics.library version 39 or greater. If it is successful, the program uses SetRGB32(); if it fails, it will open whatever version is available and use SetRGB4(). SetRGB will not try to set a colour register greater than the screen can handle. USES: I use SetRGB in scripts, to start a program which does not allow me to change the palette, and uses colours I don't like: .key args/F run some-program {args} SetRGB 00-black 01-white 02ffff00 03-turquoise I use it in .edrc files with the text editor, dme, which will source any .edrc file in the current directory when it is invoked; this allows me to colour code the editor, depending on where it was started.