[R] Odp: Colours in R

From: Petr PIKAL <petr.pikal_at_precheza.cz>
Date: Thu, 17 Jul 2008 17:05:20 +0200

Hi

Maybe there is some neat function for it but

apply(data.frame(t(col2rgb(colours()[1:10]))),1,function(x) paste(as.character.hexmode(x),collapse=""))

gives you hex values for colours specified.

Then you can use colours()[1:10] to get names (or you can invent your own) and you can print real colours in a plot by using filled rectangle.

Regards
Petr

r-help-bounces_at_r-project.org napsal dne 17.07.2008 16:25:39:

> Hi list,
>
>
> I will help an person that will use some graphics of R in internet.
>
> But this pearson want to specify the colours. This person want me to
create
> an pallete of colours like that:
>
>
> Name of color - Code - Colour
> White - 0xFFFFFF - color white (like an box with this color)
>
> I know that is possible with R, but i don't know how.
>
> Thanks for the advance.
>
>
> Atenciosamente,
> Leandro Lins Marino
> Centro de Avaliação
> Fundação CESGRANRIO
> Rua Santa Alexandrina, 1011 - 2º andar
> Rio de Janeiro, RJ - CEP: 20261-903
> ( (21) 2103-9600 R.:236
> ( (21) 8777-7907
> * leandro_at_cesgranrio.org.br
> "Aquele que suporta o peso da sociedade
> é precisamente aquele que obtém
> as menores vantagens". (SMITH, Adam)
>
> P Antes de imprimir pense em sua responsabilidade e compromisso com o
MEIO
> AMBIENTE
>
> ______________________________________________
> R-help_at_r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.



R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Thu 17 Jul 2008 - 15:11:15 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Thu 17 Jul 2008 - 15:32:04 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive