diff --git a/docs/reference/ImageColor.rst b/docs/reference/ImageColor.rst
index f3e6a6f90..187306f1b 100644
--- a/docs/reference/ImageColor.rst
+++ b/docs/reference/ImageColor.rst
@@ -31,6 +31,13 @@ The ImageColor module supports the following string formats:
   (black=0%, normal=50%, white=100%). For example, ``hsl(0,100%,50%)`` is pure
   red.
 
+* Hue-Saturation-Value (HSV) functions, given as ``hsv(hue, saturation%,
+  value%)`` where hue and saturation are the same as HSL, and value is between
+  0% and 100% (black=0%, normal=100%). For example, ``hsv(0,100%,100%)`` is
+  pure red. This format is also known as Hue-Saturation-Brightness (HSB), and
+  can be given as ``hsb(hue, saturation%, brightness%)``, where each of the
+  values are used as they are in HSV.
+
 * Common HTML color names. The :py:mod:`~PIL.ImageColor` module provides some
   140 standard color names, based on the colors supported by the X Window
   system and most web browsers. color names are case insensitive. For example,
diff --git a/src/PIL/ImageColor.py b/src/PIL/ImageColor.py
index 0e9702228..08c00fd54 100644
--- a/src/PIL/ImageColor.py
+++ b/src/PIL/ImageColor.py
@@ -101,6 +101,20 @@ def getrgb(color):
             int(rgb[2] * 255 + 0.5)
             )
 
+    m = re.match(r"hs[bv]\(\s*(\d+\.?\d*)\s*,\s*(\d+\.?\d*)%\s*,\s*(\d+\.?\d*)%\s*\)$", color)
+    if m:
+        from colorsys import hsv_to_rgb
+        rgb = hsv_to_rgb(
+            float(m.group(1)) / 360.0,
+            float(m.group(2)) / 100.0,
+            float(m.group(3)) / 100.0,
+            )
+        return (
+            int(rgb[0] * 255 + 0.5),
+            int(rgb[1] * 255 + 0.5),
+            int(rgb[2] * 255 + 0.5)
+            )
+
     m = re.match(r"rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$",
                  color)
     if m:

PIL.ImageColor.getrgb add support for HSB/HSV format
The current `PIL.ImageColor.getrgb` does not support [HSB/HSV](https://en.wikipedia.org/wiki/HSL_and_HSV) format, only the related HSL, but for easier conversion of some coordinates it would be nice to have support for HSB/HSV also.

diff --git a/Tests/test_imagecolor.py b/Tests/test_imagecolor.py
index 81ad179e6..0aac21278 100644
--- a/Tests/test_imagecolor.py
+++ b/Tests/test_imagecolor.py
@@ -78,10 +78,21 @@ class TestImageColor(PillowTestCase):
         self.assertEqual((255, 0, 0), ImageColor.getrgb("hsl(360,100%,50%)"))
         self.assertEqual((0, 255, 255), ImageColor.getrgb("hsl(180,100%,50%)"))
 
+        self.assertEqual((255, 0, 0), ImageColor.getrgb("hsv(0,100%,100%)"))
+        self.assertEqual((255, 0, 0), ImageColor.getrgb("hsv(360,100%,100%)"))
+        self.assertEqual((0, 255, 255), ImageColor.getrgb("hsv(180,100%,100%)"))
+
+        # alternate format
+        self.assertEqual(ImageColor.getrgb("hsb(0,100%,50%)"),
+                         ImageColor.getrgb("hsv(0,100%,50%)"))
+
         # floats
         self.assertEqual((254, 3, 3), ImageColor.getrgb("hsl(0.1,99.2%,50.3%)"))
         self.assertEqual((255, 0, 0), ImageColor.getrgb("hsl(360.,100.0%,50%)"))
 
+        self.assertEqual((253, 2, 2), ImageColor.getrgb("hsv(0.1,99.2%,99.3%)"))
+        self.assertEqual((255, 0, 0), ImageColor.getrgb("hsv(360.,100.0%,100%)"))
+
         # case insensitivity
         self.assertEqual(ImageColor.getrgb("RGB(255,0,0)"),
                          ImageColor.getrgb("rgb(255,0,0)"))
@@ -91,6 +102,10 @@ class TestImageColor(PillowTestCase):
                          ImageColor.getrgb("rgba(255,0,0,0)"))
         self.assertEqual(ImageColor.getrgb("HSL(0,100%,50%)"),
                          ImageColor.getrgb("hsl(0,100%,50%)"))
+        self.assertEqual(ImageColor.getrgb("HSV(0,100%,50%)"),
+                         ImageColor.getrgb("hsv(0,100%,50%)"))
+        self.assertEqual(ImageColor.getrgb("HSB(0,100%,50%)"),
+                         ImageColor.getrgb("hsb(0,100%,50%)"))
 
         # space agnosticism
         self.assertEqual((255, 0, 0),
@@ -101,6 +116,8 @@ class TestImageColor(PillowTestCase):
                          ImageColor.getrgb("rgba(  255  ,  0  ,  0  ,  0  )"))
         self.assertEqual((255, 0, 0),
                          ImageColor.getrgb("hsl(  0  ,  100%  ,  50%  )"))
+        self.assertEqual((255, 0, 0),
+                         ImageColor.getrgb("hsv(  0  ,  100%  ,  100%  )"))
 
         # wrong number of components
         self.assertRaises(ValueError, ImageColor.getrgb, "rgb(255,0)")
@@ -120,6 +137,12 @@ class TestImageColor(PillowTestCase):
         self.assertRaises(ValueError, ImageColor.getrgb, "hsl(0,100,50%)")
         self.assertRaises(ValueError, ImageColor.getrgb, "hsl(0,100%,50)")
 
+        self.assertRaises(ValueError, ImageColor.getrgb, "hsv(0,100%)")
+        self.assertRaises(ValueError, ImageColor.getrgb, "hsv(0,100%,0%,0%)")
+        self.assertRaises(ValueError, ImageColor.getrgb, "hsv(0%,100%,50%)")
+        self.assertRaises(ValueError, ImageColor.getrgb, "hsv(0,100,50%)")
+        self.assertRaises(ValueError, ImageColor.getrgb, "hsv(0,100%,50)")
+
     # look for rounding errors (based on code by Tim Hatch)
     def test_rounding_errors(self):
 

pip install -e .[dev]
parse_log_pytest
requirements.txt
apt-get update apt-get install -y gcc libjpeg-dev zlib1g-dev libtiff5-dev libfreetype6-dev liblcms2-dev libwebp-dev tcl8.6-dev tk8.6-dev libharfbuzz-dev libfribidi-dev libxcb1-dev
3.9
requirements.txt
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
alabaster==0.7.16
babel==2.17.0
blessed==1.20.0
build==1.2.2.post1
certifi==2025.1.31
charset-normalizer==3.4.1
check-manifest==0.50
cov-core==1.15.0
coverage==7.8.0
coveralls==4.0.1
docopt==0.6.2
docutils==0.21.2
exceptiongroup==1.2.2
idna==3.10
imagesize==1.4.1
importlib_metadata==8.6.1
iniconfig==2.1.0
jarn.viewdoc==2.7
Jinja2==3.1.6
MarkupSafe==3.0.2
olefile==0.47
packaging==24.2
-e git+https://github.com/python-pillow/Pillow.git@06efe1826b1075444ff86015ecc1b55b309b16e8#egg=Pillow
pluggy==1.5.0
pycodestyle==2.13.0
pyflakes==3.3.1
Pygments==2.19.1
pyproject_hooks==1.2.0
pyroma==4.2
pytest==8.3.5
pytest-cov==6.0.0
pytz==2025.2
requests==2.32.3
six==1.17.0
snowballstemmer==2.2.0
Sphinx==7.4.7
sphinx-rtd-theme==3.0.2
sphinxcontrib-applehelp==2.0.0
sphinxcontrib-devhelp==2.0.0
sphinxcontrib-htmlhelp==2.1.0
sphinxcontrib-jquery==4.1
sphinxcontrib-jsmath==1.0.1
sphinxcontrib-qthelp==2.0.0
sphinxcontrib-serializinghtml==2.0.0
tomli==2.2.1
trove-classifiers==2025.3.19.19
urllib3==2.3.0
wcwidth==0.2.13
zipp==3.21.0

name: Pillow
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:
      - alabaster==0.7.16
      - babel==2.17.0
      - blessed==1.20.0
      - build==1.2.2.post1
      - certifi==2025.1.31
      - charset-normalizer==3.4.1
      - check-manifest==0.50
      - cov-core==1.15.0
      - coverage==7.8.0
      - coveralls==4.0.1
      - docopt==0.6.2
      - docutils==0.21.2
      - exceptiongroup==1.2.2
      - idna==3.10
      - imagesize==1.4.1
      - importlib-metadata==8.6.1
      - iniconfig==2.1.0
      - jarn-viewdoc==2.7
      - jinja2==3.1.6
      - markupsafe==3.0.2
      - olefile==0.47
      - packaging==24.2
      - pluggy==1.5.0
      - pycodestyle==2.13.0
      - pyflakes==3.3.1
      - pygments==2.19.1
      - pyproject-hooks==1.2.0
      - pyroma==4.2
      - pytest==8.3.5
      - pytest-cov==6.0.0
      - pytz==2025.2
      - requests==2.32.3
      - six==1.17.0
      - snowballstemmer==2.2.0
      - sphinx==7.4.7
      - sphinx-rtd-theme==3.0.2
      - sphinxcontrib-applehelp==2.0.0
      - sphinxcontrib-devhelp==2.0.0
      - sphinxcontrib-htmlhelp==2.1.0
      - sphinxcontrib-jquery==4.1
      - sphinxcontrib-jsmath==1.0.1
      - sphinxcontrib-qthelp==2.0.0
      - sphinxcontrib-serializinghtml==2.0.0
      - tomli==2.2.1
      - trove-classifiers==2025.3.19.19
      - urllib3==2.3.0
      - wcwidth==0.2.13
      - zipp==3.21.0
prefix: /opt/conda/envs/Pillow

Tests/test_imagecolor.py::TestImageColor::test_functions Tests/test_imagecolor.py::TestImageColor::test_hash Tests/test_imagecolor.py::TestImageColor::test_rounding_errors
Tests/test_imagecolor.py::TestImageColor::test_colormap
docs/reference/ImageColor.rst src/PIL/ImageColor.py
docs/reference/ImageColor.rst src/PIL/ImageColor.py