import click


def color_setup_options(f):
    """Create common options for handing color scales"""
    f = click.option('--normalized_by_size', '-nbs',
                     help='Normalize the quantity used for color function by the number of atoms in each frame.',
                     show_default=True, default=False, is_flag=True)(f)
    f = click.option('--colormap', '-cmap',
                     help='Colormap used. Common options: gnuplot, tab10, viridis, bwr, rainbow.',
                     show_default=True, default='gnuplot')(f)
    f = click.option('--color_from_zero', '-c0',
                     help='Set the minimum to zero and only plot the excess.',
                     show_default=True, default=False, is_flag=True)(f)
    f = click.option('--color_label', '-clab',
                     help='The label for the color bar.',
                     default=None)(f)
    f = click.option('--color_column', '-ccol',
                     help='The column number used in the color file. Starts from 0.',
                     default=0)(f)
    f = click.option('--color', '-c',
                     help='Location of a file or name of the properties in the XYZ file. \
                     Used to color the scatter plot for all samples (N floats).',
                     default='none', type=str)(f)
    return f