diff --git a/pre_commit/color.py b/pre_commit/color.py
index 2ede410..c785e2c 100644
--- a/pre_commit/color.py
+++ b/pre_commit/color.py
@@ -48,9 +48,6 @@ def use_color(setting):
     if setting not in COLOR_CHOICES:
         raise InvalidColorSetting(setting)
 
-    if os.environ.get('NO_COLOR'):
-        return False
-
     return (
         setting == 'always' or
         (setting == 'auto' and sys.stdout.isatty() and terminal_supports_color)
diff --git a/pre_commit/languages/docker.py b/pre_commit/languages/docker.py
index 59a53b4..4517050 100644
--- a/pre_commit/languages/docker.py
+++ b/pre_commit/languages/docker.py
@@ -73,11 +73,18 @@ def install_environment(
         os.mkdir(directory)
 
 
+def get_docker_user():  # pragma: windows no cover
+    try:
+        return '{}:{}'.format(os.getuid(), os.getgid())
+    except AttributeError:
+        return '1000:1000'
+
+
 def docker_cmd():  # pragma: windows no cover
     return (
         'docker', 'run',
         '--rm',
-        '-u', '{}:{}'.format(os.getuid(), os.getgid()),
+        '-u', get_docker_user(),
         # https://docs.docker.com/engine/reference/commandline/run/#mount-volumes-from-container-volumes-from
         # The `Z` option tells Docker to label the content with a private
         # unshared label. Only the current container can use a private volume.

Docker language fails on Windows - os.getuid()
[`docker_cmd`](https://github.com/pre-commit/pre-commit/blob/0cf2638b3b6a2cfde89cb7013e61b2d4a3e12875/pre_commit/languages/docker.py#L80) in languages/docker.py uses `os.getuid()` and `os.getgid()` that don't exist in Python on Windows.

A hook that uses Docker on Windows fails to execute with

```
An unexpected error has occurred: AttributeError: module 'os' has no attribute 'getuid'
Traceback (most recent call last):
  File "C:\Python36\lib\site-packages\pre_commit\error_handler.py", line 46, in error_handler
    yield
  File "C:\Python36\lib\site-packages\pre_commit\main.py", line 294, in main
    return run(args.config, store, args)
  File "C:\Python36\lib\site-packages\pre_commit\commands\run.py", line 293, in run
    return _run_hooks(config, hooks, args, environ)
  File "C:\Python36\lib\site-packages\pre_commit\commands\run.py", line 214, in _run_hooks
    retval |= _run_single_hook(classifier, hook, args, skips, cols)
  File "C:\Python36\lib\site-packages\pre_commit\commands\run.py", line 124, in _run_single_hook
    tuple(filenames) if hook.pass_filenames else (),
  File "C:\Python36\lib\site-packages\pre_commit\repository.py", line 100, in run
    return lang.run_hook(self, file_args)
  File "C:\Python36\lib\site-packages\pre_commit\languages\docker.py", line 99, in run_hook
    cmd = docker_cmd() + entry_tag + cmd_rest
  File "C:\Python36\lib\site-packages\pre_commit\languages\docker.py", line 80, in docker_cmd
    '-u', '{}:{}'.format(os.getuid(), os.getgid()),
AttributeError: module 'os' has no attribute 'getuid'
```

The same hook works fine in Windows Subsystem for Linux.
diff --git a/tests/color_test.py b/tests/color_test.py
index 4ba3f32..6e11765 100644
--- a/tests/color_test.py
+++ b/tests/color_test.py
@@ -1,6 +1,5 @@
 from __future__ import unicode_literals
 
-import os
 import sys
 
 import mock
@@ -51,18 +50,3 @@ def test_use_color_tty_without_color_support():
 def test_use_color_raises_if_given_shenanigans():
     with pytest.raises(InvalidColorSetting):
         use_color('herpaderp')
-
-
-def test_no_color_env_unset():
-    with mock.patch.dict(os.environ, clear=True):
-        assert use_color('always') is True
-
-
-def test_no_color_env_empty():
-    with mock.patch.dict(os.environ, NO_COLOR=''):
-        assert use_color('always') is True
-
-
-def test_no_color_env_non_empty():
-    with mock.patch.dict(os.environ, NO_COLOR=' '):
-        assert use_color('always') is False
diff --git a/tests/languages/docker_test.py b/tests/languages/docker_test.py
index 9f7f55c..1a96e69 100644
--- a/tests/languages/docker_test.py
+++ b/tests/languages/docker_test.py
@@ -13,3 +13,14 @@ def test_docker_is_running_process_error():
         side_effect=CalledProcessError(*(None,) * 4),
     ):
         assert docker.docker_is_running() is False
+
+
+def test_docker_fallback_user():
+    def invalid_attribute():
+        raise AttributeError
+    with mock.patch.multiple(
+        'os', create=True,
+        getuid=invalid_attribute,
+        getgid=invalid_attribute,
+    ):
+        assert docker.get_docker_user() == '1000:1000'

pip install -e .[dev]
parse_log_pytest
requirements.txt
pytest pytest-cov pytest-xdist pytest-mock pytest-asyncio
apt-get update apt-get install -y gcc
3.9
requirements-dev.txt
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
aspy.yaml==1.3.0
cfgv==3.4.0
coverage==7.8.0
distlib==0.3.9
exceptiongroup==1.2.2
execnet==2.1.1
filelock==3.18.0
flake8==7.2.0
identify==2.6.9
importlib_metadata==8.6.1
iniconfig==2.1.0
mccabe==0.7.0
mock==5.2.0
nodeenv==1.9.1
packaging==24.2
platformdirs==4.3.7
pluggy==1.5.0
-e git+https://github.com/pre-commit/pre-commit.git@1874cea63e14e468e778d6c18147651bf2749ac8#egg=pre_commit
pycodestyle==2.13.0
pyflakes==3.3.1
pytest==8.3.5
pytest-asyncio==0.26.0
pytest-cov==6.0.0
pytest-env==1.1.5
pytest-mock==3.14.0
pytest-xdist==3.6.1
PyYAML==6.0.2
six==1.17.0
toml==0.10.2
tomli==2.2.1
typing_extensions==4.13.0
virtualenv==20.29.3
zipp==3.21.0

name: pre-commit
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
  - 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=3.0.16=h5eee18b_0
  - pip=25.0=py39h06a4308_0
  - python=3.9.21=he870216_1
  - readline=8.2=h5eee18b_0
  - setuptools=75.8.0=py39h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - tzdata=2025a=h04d1e81_0
  - wheel=0.45.1=py39h06a4308_0
  - xz=5.6.4=h5eee18b_1
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - aspy-yaml==1.3.0
      - cfgv==3.4.0
      - coverage==7.8.0
      - distlib==0.3.9
      - exceptiongroup==1.2.2
      - execnet==2.1.1
      - filelock==3.18.0
      - flake8==7.2.0
      - identify==2.6.9
      - importlib-metadata==8.6.1
      - iniconfig==2.1.0
      - mccabe==0.7.0
      - mock==5.2.0
      - nodeenv==1.9.1
      - packaging==24.2
      - platformdirs==4.3.7
      - pluggy==1.5.0
      - pycodestyle==2.13.0
      - pyflakes==3.3.1
      - pytest==8.3.5
      - pytest-asyncio==0.26.0
      - pytest-cov==6.0.0
      - pytest-env==1.1.5
      - pytest-mock==3.14.0
      - pytest-xdist==3.6.1
      - pyyaml==6.0.2
      - six==1.17.0
      - toml==0.10.2
      - tomli==2.2.1
      - typing-extensions==4.13.0
      - virtualenv==20.29.3
      - zipp==3.21.0
prefix: /opt/conda/envs/pre-commit

tests/languages/docker_test.py::test_docker_fallback_user
tests/color_test.py::test_format_color[foo-\x1b[42m-True-\x1b[42mfoo\x1b[0m] tests/color_test.py::test_format_color[foo-\x1b[42m-False-foo] tests/color_test.py::test_use_color_never tests/color_test.py::test_use_color_always tests/color_test.py::test_use_color_no_tty tests/color_test.py::test_use_color_tty_with_color_support tests/color_test.py::test_use_color_tty_without_color_support tests/color_test.py::test_use_color_raises_if_given_shenanigans tests/languages/docker_test.py::test_docker_is_running_process_error
pre_commit/languages/docker.py pre_commit/color.py
pre_commit/languages/docker.py pre_commit/color.py