Article View: comp.sys.sun
Article #6561Re: Sunview colors, which do you use/like?
From: Harry Langenbacher
Date: Wed, 16 Jan 1991 16:21
Date: Wed, 16 Jan 1991 16:21
35 lines
1634 bytes
1634 bytes
I like to use random colors, originally from "Hank Grebe's contribution to
SUG88 software collection", and hacked on by me.
#include <stdio.h>
#include <time.h>
main ( )
{
register int x , Br , Bg , Bb ;
srandom(time(0));
do
{
Br=random()&240;if(Br>160)Br=160;
Bg=random()&120;
Bb=random()&240;if(Bb>208)Bb=208;
x=31*Br+35*Bg+22*Bb;
}
while((x>8000)||(x<1111));
printf("-Wg -Wf %d %d %d -Wb %d %d %d",
(255-Br)|232,(255-Bg)|232,(255-Bb)|232,Br,Bg,Bb);
}
and use it like this:
textedit `randomcolors`&
cmdtool `randomcolors` &
Works for xview too !
.openwin-menu: "Calculator" exec $OPENWINHOME/bin/xview/calctool `randomcolors`
Fool around with any of the integers (color quantizing masks, max-colors,
max-brightnesses, min-brightnesses, color brightness evaluation weights,
foreground brightening bits) to get different sets of colors.
Harry Langenbacher 818-354-9513 harry%neuron6@jpl-mil.jpl.nasa.gov
Neuroprocessing & Analog Computing Devices
JPL, M/S 302-231, 4800 Oak Grove Dr, Pasadena CA 91109
Technical Details
Message-ID:
<1307@brchh104.bnr.ca>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!cunews!bnrgate!brtph3!brchh104!brchs1!bnr.ca!rice.edu!sun-spots-requestShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!cunews!bnrgate!brtph3!brchh104!brchs1!bnr.ca!rice.edu!sun-spots-request From: harry@neuron6.jpl.nasa.gov (Harry Langenbacher) Newsgroups: comp.sys.sun Subject: Re: Sunview colors, which do you use/like? Keywords: Windows Message-ID: <1307@brchh104.bnr.ca> Date: 16 Jan 91 16:21:39 GMT Sender: news@brchh104.bnr.ca Organization: Sun-Spots Lines: 35 Approved: Sun-Spots@rice.edu X-Refs: Original: v9n418, Replies: v10n8 X-Sun-Spots-Digest: Volume 10, Issue 17, message 10 X-Note: Submissions: sun-spots@rice.edu, Admin: sun-spots-request@rice.edu