Changing Processing IDE color scheme

Hello, I wanted to change Processing’s color scheme but being a sort of newbie to coding, I’m not sure what some of the tokens in the preferences.txt file correspond to. Here is the list for all token types I found in Processing.

editor.token.comment1.style=#666666,plain
editor.token.comment2.style=#666666,plain
editor.token.function1.style=#006699,plain
editor.token.function2.style=#006699,plain
editor.token.function3.style=#669900,plain
editor.token.function4.style=#006699,bold
editor.token.invalid.style=#666666,bold
editor.token.keyword1.style=#33997e,plain
editor.token.keyword2.style=#33997e,plain
editor.token.keyword3.style=#669900,plain
editor.token.keyword4.style=#d94a7a,plain
editor.token.keyword5.style=#e2661a,plain
editor.token.keyword6.style=#33997e,plain
editor.token.label.style=#666666,bold
editor.token.literal1.style=#7D4793,plain
editor.token.literal2.style=#718a62,plain
editor.token.operator.style=#006699,plain

What are the 4 function types and why is one of them of a different color? What are all the keywords? Please help me with them (all if possible). If I manage to create the file then I will post it here as well if anyone wants it. Thank you very much!

1 Like

no idea, but you are aware of

so i think the

preferences.txt

file is not supposed to be changed for the theme???

1 Like

Ah sorry my bad, what I meant was color scheme, changing the code colors as well. I am aware of the dark theme and currently have it on my PC (but I don’t use rn) and the theme.txt file being able to change some of the IDE’s colors but I want to change the color scheme. Sorry for the confusion. Some people do call it theme though.
# Code colors can be adjusted in the preferences.txt file

1 Like

good, i don’t know if you should search on about some documentation for this settings,
or just test one by one what changes,

you are right, would be good to know!

I was planning to do that once, but it seemed the process would be wayy to tedious for me at the moment. With school rolling around as well. I could work on it at some point though.

for example:
i try to play this
https://github.com/processing/processing/search?q=editor.token.function1.style&unscoped_q=editor.token.function1.style

could help to understand where it is used in the processing source code?

test:
for the 4 functions i found for words what changed:
( well that does not say much about the grouping… )

// test preferences.txt

void myFunction() {             
  for ( int i = 0; i<3; i++) {  //  editor.token.function3.style=#669900,plain ! for ok
  println();                    //  editor.token.function1.style=#006699,plain ! println ok
  }
}

void setup() {                  //  editor.token.function4.style=#006699,bold  ! setup ok
  size(100, 100);               //  editor.token.function2.style=#006699,plain ! size ok
  myFunction();
}

Thank you so much for that. Good leap forward, I would say, I had a gander at it again with some added sources and a reference to Zenburn’s source code but it’s still very confusing to say the least. I’ve gotten halfway through but I still get stuck at what keywords 4 and 6 are and function 1, 3 and 4. Not to mention Processing takes a while to start on my laptop. I will try again tomorrow and I will post my newfound sources as well. Maybe my reference to Zenburn wasn’t clear to me. Only time will tell.

I’ve been able to finish it, am in school however but I’ll be sending the file and some snapshots as well. It isn’t 100 percent accurate. I mean there were no colors I could derive from Zenburn for Processing’s built-in variables and functions as they don’t exist in pure java. Just had to use a few replacements. Painful process though. I hope that once I’m at least a bit better with coding I can create my own program where you could load a certain type of color scheme file and it would change the preferences and theme text files just like that. Thank you very much @kll

good, pls put your whole THEME + EDITOR color replacement
to github… and link it here.
a screenshot might be intriguing.

Hehe… I don’t know how to do that

1 Like

ok, no problem, if you need no public repositories … no need to make a account.

Sorry it took a while…

For/While loops don’t have unique colors outside of the Processing IDE so I had to improvise and get a different color that matched the theme’s palette, as well as Processing functions and variables. I feel like they look good though. I might work on some of my other favorites, like hamstu, but this is it for now, hope you guys enjoy! If you guys have any suggestions on changes let me know!

1 Like

thanks,

when you look at


you see he also play with the ?icons? for footer status toolbar
you did there changes too?

oh yes, the next level would be a theme switcher in preferences.txt …

I didn’t change the GUI, but I’ve thought of it, maybe some other time, I just have to find the proper colors to use and all that jazz. Thanks!

There’s news for the theme switcher? Wew my prayers have been answered haha

sorry Mark, but i not think that the full

preferences.txt

is supposed to be published/distributed, like i think it contains your unique update id .
may be you cut out just the changed color part? and post it at the github?
( and a user might edit / replace manually? ( oh this goes wrong ?? )

// or just forget this comment, sorry i talked you into this!

Sorry, is there something wrong with it? I’ve downloaded the preferences.txt and tried it and it seemed ok. The edits I made were directly on github.

it is not wrong, as it works ( ok the sketchbook path fails and creates a new sketchbook directory and i have to adjust my original one and delete the just created… )

what i wanted to say is like it contains private data…
and if everyone use your preferences.txt
foundation would be very angry ( as it sees only one user doing updates ))

//__________________________
one private comment to your color settings,that

int, for if else ... and the 
// comment

have ?nearly? same color is not nice

I don’t really understand, but do you think it would be better if I just changed the txt files to contain only the edited parts and just tell the user to copy/paste it there?
And sure I’ll try to make changes to the syntax coloring to make it have more contrast, but that is basically what Zenburn is… a “low-contrast color scheme”.
Could you please elaborate on the private data though?

understand, like it is kind of relaxing…
but the

syntax highlighting

actually has the opposite idea, to catch your eyes on the program structure…
so it was my idea to bring

// comments
/* and other info */

more to the background
but as i say, just a private remark.

//____________________________________
for the other thing:

distributing/publishing a preferences.txt file

i hope a expert can jump in.

no,no, not worry,

yes, might be better.

but actually i think the whole thing could be discussed
as a kind of processing 4.0 wish.

  • -a- move the editor color settings out of preferences.txt
  • -b- into the theme.txt
    it is now obvious to me that background and text color have to work together.
  • -c- move the theme.txt file to the “user” directory where preferences is
  • -d- make a file select entry in preferences.txt so we can hold several theme.txt files
  • -e- allow IDE /File/Preferences to select one of that files
1 Like