diff --git a/news/3427-fix-vc-prompt-color.rst b/news/3427-fix-vc-prompt-color.rst
new file mode 100644
index 00000000..f9b3c559
--- /dev/null
+++ b/news/3427-fix-vc-prompt-color.rst
@@ -0,0 +1,24 @@
+**Added:**
+
+* <news item>
+
+**Changed:**
+
+* <news item>
+
+**Deprecated:**
+
+* <news item>
+
+**Removed:**
+
+* <news item>
+
+**Fixed:**
+
+-  `[color] in .gitconfig (#3427) <https://github.com/xonsh/xonsh/issues/3427>`_ now stripped from {curr\_branch} 
+
+  - `Before <https://i.imgur.com/EMhPdgU.png>`_
+  - `After <https://i.imgur.com/sJiqgsb.png>`_
+
+
diff --git a/xonsh/prompt/vc.py b/xonsh/prompt/vc.py
index abd51a88..91f9613a 100644
--- a/xonsh/prompt/vc.py
+++ b/xonsh/prompt/vc.py
@@ -8,8 +8,16 @@ import queue
 import builtins
 import threading
 import subprocess
+import re
 
 import xonsh.tools as xt
+from xonsh.lazyasd import LazyObject
+
+RE_REMOVE_ANSI = LazyObject(
+    lambda: re.compile(r"(?:\x1B[@-_]|[\x80-\x9F])[0-?]*[ -/]*[@-~]"),
+    globals(),
+    "RE_REMOVE_ANSI",
+)
 
 
 def _get_git_branch(q):
@@ -50,6 +58,9 @@ def get_git_branch():
     t.join(timeout=timeout)
     try:
         branch = q.get_nowait()
+        # branch = RE_REMOVE_ANSI.sub("", branch or "")
+        if branch:
+            branch = RE_REMOVE_ANSI.sub("", branch)
     except queue.Empty:
         branch = None
     return branch

[color] in .gitconfig should be stripped in the prompt branch functions
In clean install with no `.xonshrc`, when I change into a git repo, my prompt looks like:

![prompt](https://i.imgur.com/ZFOPSOj.png)

Is there some setting I'm missing somewhere?

## xonfig

<details>

```
+------------------+----------------------+
| xonsh            | 0.9.13.dev1          |
| Git SHA          | 9f7ccc65             |
| Commit Date      | Oct 15 17:14:50 2019 |
| Python           | 3.7.6                |
| PLY              | 3.11                 |
| have readline    | True                 |
| prompt toolkit   | 3.0.0                |
| shell type       | prompt_toolkit2      |
| pygments         | 2.5.2                |
| on posix         | True                 |
| on linux         | True                 |
| distro           | ubuntu               |
| on darwin        | False                |
| on windows       | False                |
| on cygwin        | False                |
| on msys2         | False                |
| is superuser     | False                |
| default encoding | utf-8                |
| xonsh encoding   | utf-8                |
| encoding errors  | surrogateescape      |
+------------------+----------------------+
```


</details>

## Expected Behavior
I think something like this (without the ansi escape codes):
```
mcrowe@mike-XPS-15-9560 ~/.dotfiles/bash_it [master] $
```

diff --git a/tests/test_prompt.py b/tests/test_prompt.py
index d28e4b71..ed979d6e 100644
--- a/tests/test_prompt.py
+++ b/tests/test_prompt.py
@@ -241,6 +241,21 @@ def test_vc_get_branch(test_repo, xonsh_builtins):
     obs = getattr(vc, fun)()
     if obs is not None:
         assert obs == VC_BRANCH[test_repo["name"]]
+        if test_repo["name"] == "git":
+            with open("{}/.git/config".format(test_repo["dir"]), "a") as gc:
+                gc.write(
+                    """
+[color]
+    branch = always
+    interactive = always
+[color "branch"]
+    current = yellow reverse
+"""
+                )
+            obs = getattr(vc, fun)()
+            if obs is not None:
+                assert obs == VC_BRANCH[test_repo["name"]]
+                assert not obs.startswith(u"\u001b[")
 
 
 def test_current_branch_calls_locate_binary_for_empty_cmds_cache(xonsh_builtins):
@@ -253,7 +268,7 @@ def test_current_branch_calls_locate_binary_for_empty_cmds_cache(xonsh_builtins)
 
 
 def test_current_branch_does_not_call_locate_binary_for_non_empty_cmds_cache(
-    xonsh_builtins
+    xonsh_builtins,
 ):
     cache = xonsh_builtins.__xonsh__.commands_cache
     xonsh_builtins.__xonsh__.env = DummyEnv(VC_BRANCH_TIMEOUT=1)

pip install -e .[ptk,pygments,proctitle,linux,mac,win]
parse_log_pytest
requirements.txt
pytest pytest-flake8 pytest-cov
3.7
requirements/docs.txt requirements/tests.txt
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
alabaster==0.7.13
Babel==2.14.0
black==23.3.0
certifi @ file:///croot/certifi_1671487769961/work/certifi
cffi==1.15.1
cfgv==3.3.1
charset-normalizer==3.4.1
click==8.1.8
cloud-sptheme==1.10.1.post20200504175005
codecov==2.1.13
coverage==7.2.7
cryptography==44.0.2
cycler==0.11.0
distlib==0.3.9
distro==1.9.0
doctr==1.9.0
docutils==0.19
exceptiongroup==1.2.2
filelock==3.12.2
flake8==3.9.2
fonttools==4.38.0
gnureadline==8.2.13
identify==2.5.24
idna==3.10
imagesize==1.4.1
importlib-metadata==6.7.0
iniconfig==2.0.0
Jinja2==3.1.6
kiwisolver==1.4.5
MarkupSafe==2.1.5
matplotlib==3.5.3
mccabe==0.6.1
mypy-extensions==1.0.0
nodeenv==1.9.1
numpy==1.21.6
numpydoc==1.5.0
packaging==24.0
pathspec==0.11.2
Pillow==9.5.0
platformdirs==4.0.0
pluggy==1.2.0
pre-commit==2.21.0
prompt_toolkit==3.0.48
psutil==7.0.0
py==1.11.0
pycodestyle==2.7.0
pycparser==2.21
pyflakes==2.3.1
Pygments==2.17.2
pyparsing==3.1.4
pytest==7.4.4
pytest-cov==4.1.0
pytest-flake8==1.1.0
pytest-timeout==2.3.1
python-dateutil==2.9.0.post0
pytz==2025.2
PyYAML==6.0.1
pyzmq==26.2.1
requests==2.31.0
setproctitle==1.3.3
six==1.17.0
snowballstemmer==2.2.0
Sphinx==5.3.0
sphinxcontrib-applehelp==1.0.2
sphinxcontrib-devhelp==1.0.2
sphinxcontrib-htmlhelp==2.0.0
sphinxcontrib-jsmath==1.0.1
sphinxcontrib-qthelp==1.0.3
sphinxcontrib-serializinghtml==1.1.5
tomli==2.0.1
tornado==6.2
typed-ast==1.5.5
typing_extensions==4.7.1
urllib3==2.0.7
virtualenv==20.26.6
wcwidth==0.2.13
-e git+https://github.com/xonsh/xonsh.git@8bbefebef30f2a75a695aa6fc5ed23b14db8f842#egg=xonsh
zipp==3.15.0

name: xonsh
channels:
  - defaults
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - ca-certificates=2025.2.25=h06a4308_0
  - certifi=2022.12.7=py37h06a4308_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.4.4=h6a678d5_1
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libstdcxx-ng=11.2.0=h1234567_1
  - ncurses=6.4=h6a678d5_0
  - openssl=1.1.1w=h7f8727e_0
  - pip=22.3.1=py37h06a4308_0
  - python=3.7.16=h7a1cb2a_0
  - readline=8.2=h5eee18b_0
  - setuptools=65.6.3=py37h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - wheel=0.38.4=py37h06a4308_0
  - xz=5.6.4=h5eee18b_1
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - alabaster==0.7.13
      - babel==2.14.0
      - black==23.3.0
      - cffi==1.15.1
      - cfgv==3.3.1
      - charset-normalizer==3.4.1
      - click==8.1.8
      - cloud-sptheme==1.10.1.post20200504175005
      - codecov==2.1.13
      - coverage==7.2.7
      - cryptography==44.0.2
      - cycler==0.11.0
      - distlib==0.3.9
      - distro==1.9.0
      - doctr==1.9.0
      - docutils==0.19
      - exceptiongroup==1.2.2
      - filelock==3.12.2
      - flake8==3.9.2
      - fonttools==4.38.0
      - gnureadline==8.2.13
      - identify==2.5.24
      - idna==3.10
      - imagesize==1.4.1
      - importlib-metadata==6.7.0
      - iniconfig==2.0.0
      - jinja2==3.1.6
      - kiwisolver==1.4.5
      - markupsafe==2.1.5
      - matplotlib==3.5.3
      - mccabe==0.6.1
      - mypy-extensions==1.0.0
      - nodeenv==1.9.1
      - numpy==1.21.6
      - numpydoc==1.5.0
      - packaging==24.0
      - pathspec==0.11.2
      - pillow==9.5.0
      - platformdirs==4.0.0
      - pluggy==1.2.0
      - pre-commit==2.21.0
      - prompt-toolkit==3.0.48
      - psutil==7.0.0
      - py==1.11.0
      - pycodestyle==2.7.0
      - pycparser==2.21
      - pyflakes==2.3.1
      - pygments==2.17.2
      - pyparsing==3.1.4
      - pytest==7.4.4
      - pytest-cov==4.1.0
      - pytest-flake8==1.1.0
      - pytest-timeout==2.3.1
      - python-dateutil==2.9.0.post0
      - pytz==2025.2
      - pyyaml==6.0.1
      - pyzmq==26.2.1
      - requests==2.31.0
      - setproctitle==1.3.3
      - six==1.17.0
      - snowballstemmer==2.2.0
      - sphinx==5.3.0
      - sphinxcontrib-applehelp==1.0.2
      - sphinxcontrib-devhelp==1.0.2
      - sphinxcontrib-htmlhelp==2.0.0
      - sphinxcontrib-jsmath==1.0.1
      - sphinxcontrib-qthelp==1.0.3
      - sphinxcontrib-serializinghtml==1.1.5
      - tomli==2.0.1
      - tornado==6.2
      - typed-ast==1.5.5
      - typing-extensions==4.7.1
      - urllib3==2.0.7
      - virtualenv==20.26.6
      - wcwidth==0.2.13
      - zipp==3.15.0
prefix: /opt/conda/envs/xonsh

tests/test_prompt.py::test_vc_get_branch[git]
tests/test_prompt.py::test_format_prompt[my tests/test_prompt.py::test_format_prompt[{f} tests/test_prompt.py::test_format_prompt_with_format_spec[{a_number:{0:^3}}cats- tests/test_prompt.py::test_format_prompt_with_format_spec[{current_job:{} tests/test_prompt.py::test_format_prompt_with_format_spec[{none:{} tests/test_prompt.py::test_format_prompt_with_format_spec[{none:{}}--fields0] tests/test_prompt.py::test_format_prompt_with_format_spec[{{{a_string:{{{}}}}}}-{{cats}}-fields0] tests/test_prompt.py::test_format_prompt_with_format_spec[{{{none:{{{}}}}}}-{}-fields0] tests/test_prompt.py::test_format_prompt_with_broken_template tests/test_prompt.py::test_format_prompt_with_broken_template_in_func[{user] tests/test_prompt.py::test_format_prompt_with_broken_template_in_func[{{user] tests/test_prompt.py::test_format_prompt_with_broken_template_in_func[{{user}] tests/test_prompt.py::test_format_prompt_with_broken_template_in_func[{user}{hostname] tests/test_prompt.py::test_format_prompt_with_invalid_func tests/test_prompt.py::test_format_prompt_with_func_that_raises tests/test_prompt.py::test_format_prompt_with_no_env tests/test_prompt.py::test_format_prompt_with_various_envs[env] tests/test_prompt.py::test_format_prompt_with_various_envs[foo] tests/test_prompt.py::test_format_prompt_with_various_envs[bar] tests/test_prompt.py::test_format_prompt_with_various_prepost[)-(] tests/test_prompt.py::test_format_prompt_with_various_prepost[)-[[] tests/test_prompt.py::test_format_prompt_with_various_prepost[)-] tests/test_prompt.py::test_format_prompt_with_various_prepost[)- tests/test_prompt.py::test_format_prompt_with_various_prepost[]]-(] tests/test_prompt.py::test_format_prompt_with_various_prepost[]]-[[] tests/test_prompt.py::test_format_prompt_with_various_prepost[]]-] tests/test_prompt.py::test_format_prompt_with_various_prepost[]]- tests/test_prompt.py::test_format_prompt_with_various_prepost[-(] tests/test_prompt.py::test_format_prompt_with_various_prepost[-[[] tests/test_prompt.py::test_format_prompt_with_various_prepost[-] tests/test_prompt.py::test_format_prompt_with_various_prepost[- tests/test_prompt.py::test_format_prompt_with_various_prepost[ tests/test_prompt.py::test_noenv_with_disable_set tests/test_prompt.py::test_custom_env_overrides_default[0] tests/test_prompt.py::test_custom_env_overrides_default[1] tests/test_prompt.py::test_promptformatter_cache tests/test_prompt.py::test_promptformatter_clears_cache tests/test_prompt.py::test_test_repo[git] tests/test_prompt.py::test_test_repo[hg] tests/test_prompt.py::test_vc_get_branch[hg] tests/test_prompt.py::test_no_repo tests/test_prompt.py::test_current_branch_calls_locate_binary_for_empty_cmds_cache tests/test_prompt.py::test_current_branch_does_not_call_locate_binary_for_non_empty_cmds_cache
news/3427-fix-vc-prompt-color.rst xonsh/prompt/vc.py
news/3427-fix-vc-prompt-color.rst xonsh/prompt/vc.py