Loading...
Logo
Processing Forum
I'd love to be able to change the white background to a quadrille ruled background. I think that would help me see the indentation levels better. Is it possible to do that?

Replies(5)

You can change the color in the theme.txt, but only to an uniform color, no background image.
If you use an external editor like SciTE, you can see indentation guides...
Very casual processing tinkerer here, and over a year ago last time I tinkered with Processing. Then I did as suggested above, changing the theme.txt with colors of my liking. I so far only use the basic editor in the IDE.

Not so easy in the newish 1.5.1 it seems. I found the preferences.txt, but it is not so clear what the few color commands change. Maybe there are some omitted commands that could be included, if so where might I find such a list?

Atm I use windows vista 64-bit, but I usually use Ubuntu (9.10 and 10.04 LTS). So for Vista I found it in  C:\Users\Appdata\Roaming\Processing\preferences.txt.

Maybe it's the wrong preferences.txt? I only found these color settings:

Copy code
  1. run.present.bgcolor=#666666
  2. run.window.bgcolor=#F0F0F0

None of which I tested to change, but they don't seem to be about the editor background.
Trying:
Copy code
  1.  editor.window.bgcolor=#000000
didn't do anything.

Suggestions? White background color really gets to my eyes.
Not preference.txt (not anymore), but theme.txt as I wrote. Except I omitted to tell where it is...
Find it at: processing-1.5.1/modes/java/theme/theme.txt (ie. in the installation directory).
Beware: AFAIK, there is no way to override this file in the Users profile, alas, so you better make a copy of the original file (in case you mess up something), and a copy of the changed file (to restore it when you upgrade!).
Great, thanks!

I somehow got the impression that it was preferences.txt this time, and not the one in the installation directory (with the big warning about not editing it). Last processing I have is 1.2.1, and that one uses theme.txt also, but in another location (lib/theme/theme.txt in the installation directory, I believe).

I just had a quick glance at those theme files just now, and the only difference I saw was a few commented out .macosx stuff in the new file, and my old file seemed to work.

Cool, glad it worked for you.
I have tweaked it a lot too, made some experiments, so "improved" the comments.
For those interested, here is my version. Save it beside the original, do a diff, see what tweaks can be interesting for you.
Personally, I prefer my background white, but I understand some people are hurt by that light. Although I also always change the settings of my monitors to dim out a lot the light: most modern monitors are configured to watch videos (from the native resolution, HD, to the high contrast / light) and this isn't very good for doing desktop (writing, coding...) work.

My theme.txt:

# GUI - STATUS
status.notice.fgcolor = #000000
status.notice.bgcolor = #818b95
status.error.fgcolor = #ffffff
status.error.bgcolor = #662000
status.edit.fgcolor = #000000
status.edit.bgcolor = #cc9900
status.font = Georgia,plain,14

# GUI - TABS
# settings for the tabs at the top
# (tab images are stored in the lib/theme folder)
header.bgcolor = #818b95
header.text.selected.color = #1a1a00
header.text.unselected.color = #ffffff
header.text.font = Georgia,plain,14

# GUI - CONSOLE
# Code and console font are handled by preferences, since size/etc is modifiable
console.color = #AABBDD
console.output.color = #333333
console.error.color = #FF3000

# GUI - BUTTONS
buttons.bgcolor = #333355
buttons.status.font = Georgia,plain,14
buttons.status.color = #AAFFAA

# GUI - MODE
mode.button.bgcolor = #9ca6b0
mode.button.font = Georgia,plain,9
mode.button.color = #4a545e

# GUI - LINESTATUS
linestatus.color = #AAFFAA
linestatus.bgcolor = #333355

# EDITOR - DETAILS

# foreground and background colors
editor.fgcolor = #000000
editor.bgcolor = #ffffff

# highlight for the current line
editor.linehighlight.color=#CCEECC
# highlight for the current line
editor.linehighlight=true

# caret blinking and caret color
editor.caret.color = #0000FF

# color to be used for background when 'external editor' enabled
editor.external.bgcolor = #c8d2dc

# selection color
editor.selection.color =#BBEEFF

# unclosed string
editor.invalid.style = #FF7777,bold

# little pooties at the end of lines that show where they finish
editor.eolmarkers = false
editor.eolmarkers.color = #FF0000

# bracket/brace highlighting
editor.brackethighlight = true
editor.brackethighlight.color = #33AA33


# 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


# LINE STATUS - editor line number status bar at the bottom of the screen
linestatus.font       = Andale Mono,plain,14
linestatus.height  = 20