I've been attempting to customize the font color of HTML text within a created QTextBrowser
. While I have successfully used basic HTML commands to adjust paragraphs and change font size, I am facing difficulties with setting font color.
Below is the code snippet that I utilized:
self.key = QtGui.QTextBrowser(self)
self.key.setHtml(
"""<h1>Key</h1>
<body>
<font colour="red">
GREEN = Overall Progress is 80% or above
YELLOW = Overall Progress between 65%-79%
Orange = Overall Progress is 64% or below
</font>
</body>"""
)
While utilizing <h1>
successfully stylized "Key" as a bold and enlarged header, my attempts to utilize color tags
or even color codes
(e.g. #00ff00
) appear ineffective.