def METHOD_NAME(file_css):
    # Temporarily
    state = 0
    selectors = []
    # Results
    by_attribute = {}
    by_color = {}
    for line in file_css.read_text().splitlines():
        if line == '':
            continue
        # start of a comment
        if state == 0 and line.startswith('/*'):
            if '*/' in line:
                state = 0
            else:
                state = 1
        # we are in a comment section
        elif state == 1:
            # end of the comment
            if '*/' in line:
                state = 0
            else:
                continue
        # first line of multiple selector
        elif (state == 0 or state == 2) and ',' in line:
            state = 2
        # first line of single selector or end of multiple
        elif (state == 0 or state == 2) and '{' in line:
            state = 3
        # end of element
        elif state == 4 and line == '}':
            state = 0
        if state == 0 and len(selectors):
            selectors = []
        if state == 2:
            selector = line.split(",")[0].strip(' ')
            selectors.append(selector)
        if state == 3:
            selector = line.split("{")[0].strip(' ')
            selectors.append(selector)
            state = 4
            continue
        if state == 4:
            matched_colors = re.findall(MATCH_COLORS, line)
            if len(matched_colors) > 1:
                error("Multiple colors in a line.\n\n  {}\n\nSeems to be an invalid file!".format(line))
            elif len(matched_colors) == 1:
                matched_color = matched_colors[0]
                element = line.split(":")[0].strip(' ')
                if not matched_color in by_color:
                    by_color[matched_color] = []
                by_color[matched_color].append(element)
                entry = element + " " + matched_color
                if not entry in by_attribute:
                    by_attribute[entry] = []
                by_attribute[entry].extend(selectors)
    def sort_color(color):
        tmp = color[0].replace('#', '0x')
        return int(tmp, 0)
    def remove_duplicates(l):
        no_duplicates = []
        [no_duplicates.append(i) for i in l if not no_duplicates.count(i)]
        return no_duplicates
    colors = []
    # sort colors just by hex value
    if len(by_color):
        colors = sorted(by_color.items(), key=lambda x: sort_color(x))
    for k, l in by_attribute.items():
        by_attribute[k] = remove_duplicates(l)
    for k, l in by_color.items():
        by_color[k] = remove_duplicates(l)
    return {'fileName': file_css.stem, 'byAttribute': by_attribute, 'byColor': by_color, 'colors': colors}