We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpSyntax Questions › Processing backgrnd white; preferences.txt change
Page Index Toggle Pages: 1
Processing backgrnd white; preferences.txt change? (Read 1592 times)
Processing backgrnd white; preferences.txt change?
Sep 7th, 2009, 3:39pm
 
I guess I have sensitive eyes. To me looking at a monitor is like staring at the head light of a car at night (while it's on) trying to read what's on the glass lens.

I noticed under File> Preferences at the bottom it says.

More preferences can be edited directly in the file
C:\Documents and Settings\blablablabla Processing\preferences.txt

I tried changing

run.window.bgcolor=#989CAB

to

run.window.bgcolor=#ECECEC

Save and close file then open Processing, but Processing's background is still white.

Can this color be changed? Thanks.
Re: Processing backgrnd white; preferences.txt change?
Reply #1 - Sep 7th, 2009, 7:58pm
 
Try searching for FFFFFF if you haven't...  If not, you can use inverse mode or Nocturne on Mac, not sure about other platforms...
Re: Processing backgrnd white; preferences.txt change?
Reply #2 - Sep 7th, 2009, 9:24pm
 
Thanks for your reply.

By searching for #FFFFFF I guess you mean look within the preferences.txt.

I did and it was not there.

I don't see an inverse mode either.
Re: Processing backgrnd white; preferences.txt change?
Reply #3 - Sep 8th, 2009, 2:42am
 
I think you are looking for editor.bgcolor property (found by searching "bgcolor"...).
BUT, newer version of Processing no longer get style information from preferences.txt.
If you rename this file and open Processing (PDE) then close it, you will find a fresh new file, half the size of the previous one: all the style information (almost... there is still font information) is gone.
Personally, I sorted both files, and using a diff utility (WinMerge), I transferred my old preferences (particularly the sketchbook path! also window dimensions, font, etc.) to the new one, to avoid any confusion.

Now, you can still change color information (and some fonts...). Unfortunately, it is in the Processing install folder: I recall I carefully (and painfully: had to stop and restart PDE several times) tweaked the settings... to lost them because I forgot to transfer them to the new version and had to remove the old version to free some place.

Whatever, go to to <Processing install dir>/lib/theme and edit the values there. Remember to make a backup, eg. in Application Data/Processing, where preferences.txt is already.

Mr. Fry, if you happen to read this, it would be nice to first try and read theme.txt from this directory.
Well, I will open a bug / suggestion report, it might be more efficient...
[EDIT] Done: Bug #1322
Re: Processing backgrnd white; preferences.txt change?
Reply #4 - Sep 8th, 2009, 9:20am
 
What is this doing in "Syntax questions" section? I had some trouble finding it back, searching everywhere except here!

Oh well.
I played with the theme.txt file. I found out some comments were inaccurate, particularly for the syntax colors. Part of the trouble might come from the fact the keywords.txt file is partly autogenerated and some words have two styles, perhaps because they can be Java keyword and function name (eg. float/int) or P5 variable name and function (eg. frameRate).

Here are my corrected comments, after experimentation in 1.0.5. Don't pay attention to values, these are my personal settings.
Code:
# unclosed string
editor.invalid.style = #FF7777,bold

# TEXT - KEYWORDS

# e.g abstract, final, private, void, class, color; null, true, this...
# short and double
editor.keyword1.style = #0055AA,plain

# e.g. beginShape, point, line...
# also byte, char, int, float, boolean (not short nor double!)
editor.keyword2.style = #A00070,plain

# setup, draw, pushStyle, popStyle
editor.keyword3.style =#FF8855,bold

# There are some inconsistencies above because part of keywords.txt is autogenerated
# and some keywords are also used as function names (int, float...)
# and some variables are also functions (frameRate...).

# TEXT - LITERALS

# Literal strings and chars
editor.literal1.style = #8000FF,plain

# p5 built in variables: e.g. mouseX, width, pixels, frameCount...
# and constants: e.g. RGB, TWO_PI
editor.literal2.style = #FF8855,plain

# e.g. + - = /
# (doesn't work!)
editor.operator.style = #FF0000,plain

# for words followed by a colon (goto labels)
editor.label.style = #F00080,bold


# TEXT - COMMENTS
# Block and line comments
editor.comment1.style = #7070A0,plain
# Doc comments /** */
editor.comment2.style = #0000A0,plain
Re: Processing backgrnd white; preferences.txt change?
Reply #5 - Sep 8th, 2009, 11:19am
 
Thanks so much.

I made a backup of both preferences and theme. I changed the background color in theme and processing is now much more pleasant to use.
Re: Processing backgrnd white; preferences.txt change?
Reply #6 - Sep 9th, 2009, 9:46am
 
Glad you got it.  Just an aside, but P5 inverted using OSX's "invert" function (control-command-option-8) is so close to the colors I would naturally choose that I have to wonder if it was designed that way...
e.g.:

...
Re: Processing backgrnd white; preferences.txt change?
Reply #7 - Sep 9th, 2009, 11:38am
 
nice...
Page Index Toggle Pages: 1