From 3ebbb098d62fcbe6aa2b317112ef893138fe0683 Mon Sep 17 00:00:00 2001 From: Peter Corke Date: Thu, 26 Nov 2026 05:42:40 +1000 Subject: [PATCH] docs: the name2color example uses a color name that exists name2color("lime green") returned None because Matplotlib's color names have no spaces, so the example showed a failure by accident. It now shows "limegreen", and keeps the spaced name as the example of an unknown name. Co-Authored-By: Claude Sonnet 5.5 --- src/machinevisiontoolbox/base/color.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/machinevisiontoolbox/base/color.py b/src/machinevisiontoolbox/base/color.py index 89b8a49a..14156c6a 100755 --- a/src/machinevisiontoolbox/base/color.py +++ b/src/machinevisiontoolbox/base/color.py @@ -790,7 +790,8 @@ def name2color( >>> name2color("r", dtype="uint8") >>> name2color("red", colororder={"R": 2, "G": 1, "B": 0}) >>> name2color("r", "xy") - >>> name2color("lime green") + >>> name2color("limegreen") + >>> name2color("lime green") # None: Matplotlib's names have no spaces .. note:: Uses color database from Matplotlib.