qspec logo qspec logo

A physics toolbox for laser spectroscopy.

Static Badge Static Badge Static Badge

Static Badge Static Badge

© 2026 Patrick Müller. All rights reserved.

qspec. print_colored  (  specifier ,  *values ,  returned=False ,  **kwargs  )[source]

Print with the specified color.

Parameters:
specifierstr

The name of a color defined in COLORS or an RGB value (0-255, 0-255, 0-255).

valuesobject

The values to print.

returnedbool

Whether to return the colored str instead of printing it.

kwargs

Additional keyword arguments are passed to print.

Returns:
sstr | None

The colored values if returned is True, else None.