Set label font color from hex value
<p>I am trying to set a font color on a QLabel to a hex value received from the server.</p>

<p>Currently I am just setting the text of the label but have no idea how to set the font color.</p>

<pre><code>def set_stat_lbl(self):
    palette = QPalette()
    palette.setColor(QPalette.Foreground, self.stat_value_color)
    self.stat_lbl.setText(_translate("rep_stat", self.stat_name, None))
    self.stat_lbl.setPalette(palette)
</code></pre>

<p>Where <code>self.stat_value_color</code> would be a hex string like <code>#fb0000</code>. The above code clearly doesn't work as it wants a color not a string. </p>