I would like to add an opaque text box with a legend in pymol, but found no relevant info about, any help would be appreciated
Can't you export a PNG picture first, and add the text box afterward in a general 2D drawing software?
You can use python scripting functionality in PyMol to draw anything you want with pymol.cgo module.
pymol.cgo
Here is an example how to write text: http://www.pymolwiki.org/index.php/CGO_Text
If you search the PyMol wiki for CGO you will find many more examples, which most likely include all elements required to draw opaque rectangular shape for a frame of your text box.
Login before adding your answer.
Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Can't you export a PNG picture first, and add the text box afterward in a general 2D drawing software?