https://github.com/sebshader/pdnext/releases
what part of the code needs to be modified to set colors?
-
changing font color in pd vanilla.
-
you need to put the color variables in a .tcl file in your pd path that pd will load at startup.
Heres mine (what the screenshots are of):
colors-plugin.tclthe specific variables you want are objtxt_color for object boxes, msgtxt_color for message boxes, and comment_color for comments. txt_hilight is for the color the text is highlighted over when selecting it. graph_outline is also for the graph (GOP subpatch/abstraction) texts I believe
-
hi and thanks, if i put the colors-plugin.tcl file in Pd/externals or the extra or tcl folders nothing changes.
if it is in ../extra and i add the path ../extra i get
'colors-plugin.tcl' already loaded, ignoring: '/Downloads/pd-0.48-1_vanilla/extra/colors-plugin.tcl'
is there a place in the existing .tcl files where that info could be added?
p.s. i did try building pdnext on a pi and was able to but the text in object boxes when not in edit mode was not visible and there were a lot of Audio I/O errors that caused breaks in the audio.
here is a screenshot.
-
What system are you on when not on pi? it should work to put the .tcl file anywhere that you would put the folders for libraries. (also the extra folder should work)
On OS X when the Log level is 3 i get "Loading plugin: /Users/sebshader/Library/Pd/colors-plugin.tcl". Of course you have to restart Pd once you move it there in order to search for libraries again.If you do want to "hard-code" the colors you can edit line 233 of pd-gui.tcl in the tcl folder
As for the Pi issue unfortunately I don't have anything other than OS X to test on, perhaps try different color values for the text? It might also be a tcl/tk issue for Pi. Did regular Pd Vanilla work well on Pi? this is very bizarre behavior. perhaps it simply does not have enough memory on-hand?
are you using Tcl/Tk 8.5?
thanks for testing -
would really like something that works the same way cross-platform.
still no luck applying color changes to plain vanilla using either method.
but pdnext now seems to workwhen modifying colors
set ::objtxt_color "#black"
started causing a tcl error in the console
which seems to be fixed by switching "#black" to a hex value. so far the audio errors seemed to have stopped too. /(could also have been memory)
this was the error:
(Tcl) UNHANDLED ERROR: invalid color name "#black" (processing "-fill" option) invoked from within "$tkcanvas create text $x $y -tags $tags -text $text -fill $color -anchor nw -font [get_font_for_size $font_size]" (procedure "pdtk_text_new" line 2) invoked from within "pdtk_text_new .x1287928.c {.x1287928.t1288070 obj text} 193.000000 117.000000 { } 10 $objtxt_color" ("uplevel" body line 3) invoked from within "uplevel #0 $docmds"
is there any way of switching the cursor color when in edit mode? what i am wondering about is the blinking cursor when editing against dark backgrounds.
-
plain vanilla doesn't support colors (which is why I modded it along with different inlets/outlets/cords mainly with code from extended)
the named colors do not use # it's just "black". Glad to hear you got it working!
I don't know much about switching cursor color, you might want to check out the hcs library, I think you can change stuff about the cursor. Maybe in the next release I'll add some variables for it
-
sorry for the confusion.
does your version stay current with vanilla otherwise?
are there other things that are different apart from the stuff mentioned? -
hyopothetically yes
it doesn't differ otherwise except for an included [initbang] and [closebang] -
i could be wrong about this but i think i was able to change background color in vanilla using the kiosk plugin
by changing line 176 of kiosk-plugin.tcl
$tkcanvas configure -background ""
but have no idea if other colors could be set using that also.
-
@youaresound Background colour you can change in vanilla without a plug-in by sending a message to [sys-gui]......... (if you copy it from extended into the vanilla extra folder).
Or as @seb-harmonik.ar is (maybe, but maybe more complex) doing, you could change some of the tcl to give yourself extra menus......
https://forum.pdpatchrepo.info/topic/9991/woof-a-new-window-menu-for-vanilla-tclDavid.
-
I doubt many other colors can be changed this way considering the manual page of setPalette https://www.tcl.tk/man/tcl/TkCmd/palette.htm
-
@seb-harmonik.ar Yes, just background I think. You must be rewriting C code I image to get the line traversal to work......?
David. -
As I said above I usually just copied Pd-extended c code, though I did modify some myself for the GOP box, text highlight, and select box colors