Set the foreground color. Parameters ---------- fg : :mpltype:`color` isRGBA : bool If *fg* is known to be an ``(r, g, b, a)`` tuple, *isRGBA* can be set to True to improve performance.
(self, fg, isRGBA=False)
| 905 | self._dashes = dash_offset, dash_list |
| 906 | |
| 907 | def set_foreground(self, fg, isRGBA=False): |
| 908 | """ |
| 909 | Set the foreground color. |
| 910 | |
| 911 | Parameters |
| 912 | ---------- |
| 913 | fg : :mpltype:`color` |
| 914 | isRGBA : bool |
| 915 | If *fg* is known to be an ``(r, g, b, a)`` tuple, *isRGBA* can be |
| 916 | set to True to improve performance. |
| 917 | """ |
| 918 | if self._forced_alpha and isRGBA: |
| 919 | self._rgb = fg[:3] + (self._alpha,) |
| 920 | elif self._forced_alpha: |
| 921 | self._rgb = colors.to_rgba(fg, self._alpha) |
| 922 | elif isRGBA: |
| 923 | self._rgb = fg |
| 924 | else: |
| 925 | self._rgb = colors.to_rgba(fg) |
| 926 | |
| 927 | @_docstring.interpd |
| 928 | def set_joinstyle(self, js): |
no test coverage detected