From 33d51765f853fd1e7157a9f29b138862568608f9 Mon Sep 17 00:00:00 2001 From: Mohamed Elwasila Date: Tue, 6 Jan 2026 09:51:27 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=9D=20Add=20module=20docstring=20to=20?= =?UTF-8?q?colors=20module?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- typer/colors.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/typer/colors.py b/typer/colors.py index 54e7b166cb..b49f01fca1 100644 --- a/typer/colors.py +++ b/typer/colors.py @@ -1,4 +1,15 @@ -# Variable names to colors, just for completion +"""Color constants for terminal output styling. + +This module provides string constants for standard and bright terminal colors +that can be used with typer's styling functions like `typer.style()` and +`typer.secho()` for the `fg` (foreground) and `bg` (background) parameters. + +Example: + >>> import typer + >>> typer.secho("Hello", fg=typer.colors.GREEN) + >>> styled = typer.style("Error", fg=typer.colors.RED, bold=True) +""" + BLACK = "black" RED = "red" GREEN = "green"