def get_segment_names(cos_spectrum):
    """
    Returns a list of segment names sorted such that the bluest segment come
    first.

    :param cos_spectrum: COS spectrum as returned by READSPEC.

    :type cos_spectrum: COSSpectrum

    :returns: list -- A list of segment names.
    """
    segment_names = list(cos_spectrum.segments.keys())
    if cos_spectrum.band == 'FUV':
        segment_names.sort(reverse=True)
    else:
        segment_names.sort(reverse=False)
    return segment_names
