def ishexcolor(value):
    """
    Return whether or not given value is a hexadecimal color.
    If the value is a hexadecimal color, this function returns ``True``, otherwise ``False``.

    Examples::

        >>> ishexcolor('#ff0034')
        True

        >>> ishexcolor('#ff12FG')
        False

    :param value: string to validate hexadecimal color
    """
    value = value.lstrip('#')
    try:
        return int(value, 16) >= 0 and len(value) in (3, 6)
    except ValueError:
        return False