Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions doc/changes/devel/12470.bugfix.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Fix the default color of :meth:`mne.viz.Brain.add_text` to properly contrast with the figure background color, by `Marijn van Vliet`_.
2 changes: 2 additions & 0 deletions mne/viz/_brain/_brain.py
Original file line number Diff line number Diff line change
Expand Up @@ -2917,6 +2917,8 @@ def add_text(
name = text if name is None else name
if "text" in self._actors and name in self._actors["text"]:
raise ValueError(f"Text with the name {name} already exists")
if color is None:
color = self._fg_color
for ri, ci, _ in self._iter_views("vol"):
if (row is None or row == ri) and (col is None or col == ci):
actor = self._renderer.text2d(
Expand Down