color_tools.cli_commands.handlers

Command handlers for color_tools CLI.

color_tools.cli_commands.handlers.handle_name_command(args)[source]

Handle the ‘name’ command - generate descriptive color names.

Parameters:

args (Namespace) – Parsed command-line arguments

Return type:

None

Exits:

0: Success 2: Invalid input

color_tools.cli_commands.handlers.handle_validate_command(args)[source]

Handle the ‘validate’ command - verify color name matches hex code.

Parameters:

args (Namespace) – Parsed command-line arguments

Return type:

None

Exits:

0: Color is a match 1: Color is not a match

color_tools.cli_commands.handlers.handle_cvd_command(args)[source]

Handle the ‘cvd’ command - simulate or correct color vision deficiency.

Parameters:

args (Namespace) – Parsed command-line arguments

Return type:

None

Exits:

0: Success 2: Invalid input

color_tools.cli_commands.handlers.handle_color_command(args, json_path=None)[source]

Handle the ‘color’ command - search and query CSS colors.

Parameters:
  • args (Namespace) – Parsed command-line arguments

  • json_path (Path | str | None) – Optional custom data directory

Return type:

None

Exits:

0: Success 1: Color not found or error 2: Invalid input

color_tools.cli_commands.handlers.handle_filament_command(args, json_path=None)[source]

Handle the ‘filament’ command - search and query 3D printing filaments.

Parameters:
  • args (Namespace) – Parsed command-line arguments

  • json_path (Path | str | None) – Optional custom data directory

Return type:

None

Exits:

0: Success 1: Filament not found or error 2: Invalid input

color_tools.cli_commands.handlers.handle_convert_command(args)[source]

Handle the ‘convert’ command - convert between color spaces and check gamut.

Parameters:

args (Namespace) – Parsed command-line arguments

Return type:

None

Exits:

0: Success 2: Invalid input

color_tools.cli_commands.handlers.handle_image_command(args)[source]

Handle all image processing commands.