RE: [R] colors and palettes and things...

From: bogdan romocea <>
Date: Tue 24 May 2005 - 04:04:41 EST

  1. I faced the same issue and came up with the code below.
  2. See rainbow().

allcol <- colors()

clr <- 1
for (i in 66:1) for (j in 10:1) {
	if (clr > length(allcol)) break
	clr <- clr + 1

-----Original Message-----
From: Jeff D. Hamann [] Sent: Monday, May 23, 2005 11:35 AM
Subject: [R] colors and palettes and things...

After trying to find if there was a color picker in the FAQs and the help, I thought I would send a post here. I was overwhelmed with all the wonderful color choices R has predefined (discovered after typing in colors()) but can't figure out what they all (by name) look like. Is there a color picker or some other method to display all those colors next to the name?

I think I can put together palettes, but another question I have then regards the building of palettes (a list of variable length I can select or create myself other than the ones defined by Palette) so I can pass these colors into functions instead of having to predefine a bunch of colors myself or use the predefined colors like terrain.colors(n)?

Are there groups of colors in the colors() that I can group together to make some nice palettes for drawing barplots, etc?


Jeff D. Hamann
Forest Informatics, Inc.
PO Box 1421
Corvallis, Oregon 97339-1421
phone 541-754-1428
fax 541-752-0288

______________________________________________ mailing list PLEASE do read the posting guide!
______________________________________________ mailing list PLEASE do read the posting guide!
Received on Tue May 24 04:11:25 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:32:00 EST