I'm using the minted package to highlight some Python code, and currently I'm using \usemintedstyle{trac}.

I want to change the color of the comment (from the current light brown-ish) to green. My understanding is that you either define a new style and include it in the styles folder of pygments or you can change trac.py directly.

In trac.py, I see:

Comment: 'italic #999988',
Comment.Preproc: 'bold noitalic #999999',
Comment.Special: 'bold #999999',

However, modiyfing the hex codes above does not seem to affect the color of comments in the output. In fact, the output for comment is not italic at all (which I like) but it is specified as italic here.

So how exactly the styles defined in pygments affect the output of minted package? Is there something else I've missed?

1 Answer 1


It seems that minted creates a folder in the current directory and "caches" the styles you are using in there. If you delete the corresponding file from the folder folder, any changes you make to trac.py should then take effect.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .