color_tools.cli_commands
CLI package for color_tools.
- color_tools.cli_commands.handle_name_command(args)[source]
Handle the ‘name’ command - generate descriptive color names.
- Exits:
0: Success 2: Invalid input
- color_tools.cli_commands.handle_validate_command(args)[source]
Handle the ‘validate’ command - verify color name matches hex code.
- Exits:
0: Color is a match 1: Color is not a match
- color_tools.cli_commands.handle_cvd_command(args)[source]
Handle the ‘cvd’ command - simulate or correct color vision deficiency.
- Exits:
0: Success 2: Invalid input
- color_tools.cli_commands.handle_color_command(args, json_path=None)[source]
Handle the ‘color’ command - search and query CSS colors.
- Parameters:
- Return type:
- Exits:
0: Success 1: Color not found or error 2: Invalid input
- color_tools.cli_commands.handle_harmony_command(args)[source]
Handle the top-level
harmonycommand.
- color_tools.cli_commands.handle_filament_command(args, json_path=None)[source]
Run a filament command with a scoped multi-color configuration.
- color_tools.cli_commands.handle_convert_command(args)[source]
Handle the ‘convert’ command - convert between color spaces and check gamut.
- Exits:
0: Success 2: Invalid input
- color_tools.cli_commands.handle_image_command(args, json_path=None)[source]
Handle all image processing commands.
- color_tools.cli_commands.validate_color_input_exclusivity(args)[source]
Validate that –value and –hex are mutually exclusive.
- Parameters:
args (
Namespace) – Parsed command-line arguments- Raises:
SystemExit – If both –value and –hex are specified
- Return type:
- color_tools.cli_commands.get_rgb_from_args(args)[source]
Extract RGB tuple from either –value or –hex arguments.
- color_tools.cli_commands.parse_hex_or_exit(hex_string)[source]
Parse a hex color string into RGB values, exiting on error.
- color_tools.cli_commands.is_valid_lab(lab_tuple)[source]
Validate if a Lab tuple is within the standard 8-bit Lab range. Lab tuple format: (L*, a*, b*)
- color_tools.cli_commands.is_valid_lch(lch_tuple)[source]
Validate if an LCh(ab) tuple is within the standard range. LCh tuple format: (L*, C*, h°)
- color_tools.cli_commands.get_program_name()[source]
Determine the proper program name based on how we were invoked.
- Return type:
- Returns:
Program name to display in help text
- color_tools.cli_commands.show_override_report(json_dir=None)[source]
Show detailed report of user overrides and exit.
Analyze all three user data files using the same merge reports returned by the public loaders.
- color_tools.cli_commands.generate_user_hashes(json_dir=None)[source]
Generate .sha256 files for all active user files and exit.
Creates hash files for user/user-colors.json, user/user-filaments.json, and user/user-synonyms.json if they exist, plus discoverable user palettes. Copyable example files are excluded.
- color_tools.cli_commands.get_available_palettes(json_path=None)[source]
Get list of available palette names from both core and user palettes with color counts.