edit comment colour

800 views
Skip to first unread message

dphi...@bhbs.hereford.sch.uk

unread,
Jan 27, 2017, 5:15:19 AM1/27/17
to thonny
Is there any way to change the colour of comments? The reason for this is that I often use Thonny in school and project onto a whiteboard - the fact that the comments are pale grey means that they are often really hard to read for students because of the washing out of colours when using the OHP.
I (and my students) much prefer Thonny to IDLE, but I have had to resort to using IDLE whenever I need to emphasize the importance  of comments in code (which is fairly often with a bunch of teenage coders!)

Thanks

Aivar Annamaa

unread,
Jan 27, 2017, 5:30:57 AM1/27/17
to thonny
Hi!

Currently Thonny doesn't allow configuring syntax colors, but I added this to my TODO list: https://bitbucket.org/plas/thonny/issues/194/make-syntax-highlighting-configurable. Check this link for a temporary workaround.

best regards
Aivar

dphi...@bhbs.hereford.sch.uk

unread,
Feb 2, 2017, 3:54:41 AM2/2/17
to thonny
Thanks - this is exactly what I needed :)

Boris Chiriboga

unread,
Mar 11, 2018, 12:42:59 PM3/11/18
to thonny
Hi, sorry for taking your time:
is there any way to change the color for triple quotes comments?? As for use them as documentation comments?
I tried this:

but does not work. It works fine for built in though.

Aivar Annamaa

unread,
Mar 11, 2018, 2:30:14 PM3/11/18
to thonny
Hi!

Try changing self.multiline_tagdefs in coloring.py, eg.

        self.multiline_tagdefs = {
            "STRING_CLOSED3": {"font":main_font, 'background':None, 'foreground':"Red"},
            "STRING_OPEN3"  : self.uniline_tagdefs["STRING_OPEN"],
            }


best regards,
Aivar

Boris Chiriboga

unread,
Mar 11, 2018, 4:56:02 PM3/11/18
to thonny
Thank you so much!!
Reply all
Reply to author
Forward
0 new messages