From 21efe1b60d76cc89f4143a006716dd6ecf0ba847 Mon Sep 17 00:00:00 2001 From: TomJGooding <101601846+TomJGooding@users.noreply.github.com> Date: Fri, 23 May 2025 20:18:33 +0100 Subject: [PATCH] docs(color): clarify hex properties are uppercase Currently the examples in the hex property docstrings are lowercase, but the formatted hexadecimal numbers are uppercase. --- src/textual/color.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/textual/color.py b/src/textual/color.py index 302fac9b42..130bbc4728 100644 --- a/src/textual/color.py +++ b/src/textual/color.py @@ -301,7 +301,7 @@ def brightness(self) -> float: def hex(self) -> str: """The color in CSS hex form, with 6 digits for RGB, and 8 digits for RGBA. - For example, `"#46b3de"` for an RGB color, or `"#3342457f"` for a color with alpha. + For example, `"#46B3DE"` for an RGB color, or `"#3342457F"` for a color with alpha. """ r, g, b, a, ansi, _ = self.clamped if ansi is not None: @@ -316,7 +316,7 @@ def hex(self) -> str: def hex6(self) -> str: """The color in CSS hex form, with 6 digits for RGB. Alpha is ignored. - For example, `"#46b3de"`. + For example, `"#46B3DE"`. """ r, g, b, _a, _, _ = self.clamped return f"#{r:02X}{g:02X}{b:02X}"