def compress_hex(color):

    m = HEX_COMPRESS_RE.match(color)
    if m:
        color = '#' + m.group(1) + m.group(2) + m.group(3)
        if m.group(4):
            color += m.group(4)
    return color
Compress hex.
dataset/ETHPy150Open facelessuser/ColorHelper/color_helper_util.py/compress_hex