Iago Giné Vázquez
2024-May-07 09:51 UTC
[R] Is there some way to customize colours for the View output?
Hi all, As the email subject tells, I write to ask if there is the chance to customize the colours (and in particular the background) of the `View` output window. In the View help, it is told that: On Windows, the initial size of the data viewer window is taken from the default dimensions of a pager (see Rconsole), but adjusted downwards to show a whole number of rows and columns. So if it works for the sizes, it could work for the colours. But after modifying ## Colours for console and pager(s) # (see rwxxxx/etc/rgb.txt for the known colours). background = gray9 normaltext = yellow usertext = YellowGreen highlight = golderod I did not have success. On the other hand, in the data.entry it is told that The data entry window responds to X resources of class R_dataentry. Resources foreground, background and geometry are utilized. But I do not know if this is related and how to modify those resources. Can someone help me? If this is not possible, is there any chance of making a feature request of this to R-devel? (I mean, I could write to R-devel list, but do you think there would be any interest in developing this?) Thanks! Best regards, Iago [[alternative HTML version deleted]]
Duncan Murdoch
2024-May-07 10:24 UTC
[R] Is there some way to customize colours for the View output?
If you are using X11, then the paragraph on X resources is relevant. Create a file named .Xresources in your home directory, and put a line like R_dataentry.background: green in it. On my Mac, this has to be in place before Xquartz is started. There is probably a similar restriction on other platforms. Colour names (used for foreground and background) can be words or hex colors like #ffffff . I don't know the format for "geometry", but I'd guess it's like the -geometry argument to X11 apps, e.g. 1000x1000+0+0. If you are on Windows, none of this is relevant. Duncan Murdoch On 07/05/2024 5:51 a.m., Iago Gin? V?zquez wrote:> Hi all, > > As the email subject tells, I write to ask if there is the chance to customize the colours (and in particular the background) of the `View` output window. > > > In the View help, it is told that: > > On Windows, the initial size of the data viewer window is taken from the default dimensions of a pager (see Rconsole), but adjusted downwards to show a whole number of rows and columns. > > So if it works for the sizes, it could work for the colours. But after modifying > > ## Colours for console and pager(s) > # (see rwxxxx/etc/rgb.txt for the known colours). > background = gray9 > normaltext = yellow > usertext = YellowGreen > highlight = golderod > > I did not have success. > > On the other hand, in the data.entry it is told that > > The data entry window responds to X resources of class R_dataentry. Resources foreground, background and geometry are utilized. > > But I do not know if this is related and how to modify those resources. > > Can someone help me? > > If this is not possible, is there any chance of making a feature request of this to R-devel? (I mean, I could write to R-devel list, but do you think there would be any interest in developing this?) > > Thanks! > Best regards, > > Iago > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see > 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.
Ivan Krylov
2024-May-07 11:56 UTC
[R] Is there some way to customize colours for the View output?
? Tue, 7 May 2024 09:51:55 +0000 Iago Gin? V?zquez <iago.gine at sjd.es> ?????:> In the View help, it is told that: > > On Windows, the initial size of the data viewer window is taken > from the default dimensions of a pager (see Rconsole), but adjusted > downwards to show a whole number of rows and columns.The Windows data editor lives in src/library/utils/src/windows/dataentry.c [1]. There are references to the array guiColors and indices dataeditbg, dataedituser, dataeditbg, dataeditfg. I was able to find the colours with these names in the GUI preferences, edit them and see an effect on the edit() window. -- Best regards, Ivan [1] https://svn.r-project.org/R/trunk/src/library/utils/src/windows/dataentry.c
Apparently Analagous Threads
- FR: Customize background colour of row and column headers for the View output
- FR: Customize background colour of row and column headers for the View output
- Is there some way to customize colours for the View output?
- FR: Customize background colour of row and column headers for the View output
- Is there some way to customize colours for the View output?