Note

This page is a reference documentation. It only explains the function signature, and not how to use it. Please refer to the user guide for the big picture.

brainprep.utils.color.print_color

brainprep.utils.color.print_color(color, text, end='\n')[source]

Print a message to the console using a given color.

The output style depends on the global brainprep options:

  • If verbose is False, no message is printed.

  • If no_color is True, the message is printed without color styling.

Parameters:
colorstr

Name of the color style to apply.

textstr

The message to display.

endstr, optional

String appended after the message. Default "\\n".

Notes

Color styling is handled by rich.