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. rgb_to_hex_color  (  r ,  g ,  b  )[source]

Convert an RGB color into its hexadecimal representation.

Parameters:
rint_like

The red value (0-255).

gint_like

The green value (0-255).

bint_like

The blue value (0-255).

Returns:
hexstr

A hexadecimal str representation "#rrggbb" of the color.