def hex_max(value):
    """Gets the maximum color channel value for a hex color value.
    >>> hex_max('#ddeeff')
    255
    >>> hex_max('#00001111aaaa')
    65535
    """
    value = value.lstrip('#')
    return int('f' * (len(value) / 3), 16)
