'Set the foreground color.  fg can be a matlab format string, a
html hex color string, an rgb unit tuple, or a float between 0
and 1.  In the latter case, grayscale is used.'

def set_foreground(self, fg, isRGBA=None):

    DEBUG_MSG(u'set_foreground()', 1, self)
    self.select()
    GraphicsContextBase.set_foreground(self, fg, isRGBA)
    self._pen.SetColour(self.get_wxcolour(self.get_rgb()))
    self.gfx_ctx.SetPen(self._pen)
    self.unselect()
