research.utils.val_to_color

research.utils.val_to_color(col, cmap='RdYlBu_r')[source]

Converts a column of values to hex-type colors.

Parameters
colarray-like of shape (n_samples,)

Values to convert to hex-type color code

cmapstr or ~matplotlib.colors.Colormap

The colormap used to map normalized data values to RGBA colors

Returns
colorsarray-like of shape (n_samples,)

Array with hex values as string type.