sciris.sc_colors.hex2rgb

hex2rgb(string)[source]

A little helper function to convert e.g. ‘87bc26’ to a pleasing shade of green.

Example:

rgb = sc.hex2rgb('#87bc26') # Returns array([0.52941176, 0.7372549 , 0.14901961])