[R] How to permanently change console colours in R

Peter Ehlers ehlers at ucalgary.ca
Wed Nov 14 00:16:00 CET 2012


On 2012-11-13 10:49, vinay_ragas wrote:
> Hello.
>
> I am new to R and I like it very much... I am learning to use it day-by-day.
> I have a query which might be a novice level for you. I want to know how to
> change the background and text colours in the R console. Doing google
> searches, I found to go to preferences in Edit and to change them. All I
> could do is to change the colours and then save them as a format and on each
> usage, I have to load those setup using the saved file.
>
> I want to change this once for all. And am crazy about the MATRIX themes, so
> I would like to have the black as background and green2 as the text file.
> Please help me in this.
>
> And by the way, I use Windows 7, and installed R 2.13.0 version.
>
>
> Regards,
> Vinay

Look for the file Rconsole in the RHome/etc folder.
Then look for (near the bottom):

   ## Colours for console and pager(s)
   # (see rwxxxx/etc/rgb.txt for the known colours).
   background = White
   normaltext = NavyBlue
   usertext = Red
   highlight = DarkRed

Adjust to suit your tastes and save.
For example, my aging eyes prefer

   background = black
   normaltext = DarkSeaGreen
   usertext = yellow
   highlight = HotPink

And you should really consider updating your R version.

Peter Ehlers




More information about the R-help mailing list