# Stubs for xlrd.formatting (Python 3)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.

from .timemachine import *
from .biffh import BaseObject
from typing import Any

DEBUG: int
excel_default_palette_b5: Any
excel_default_palette_b2: Any
excel_default_palette_b8: Any
default_palette: Any
built_in_style_names: Any

def initialise_colour_map(book: Any) -> None: ...
def nearest_colour_index(colour_map: Any, rgb: Any, debug: int = ...): ...

class EqNeAttrs:
    def __eq__(self, other: Any): ...
    def __ne__(self, other: Any): ...

class Font(BaseObject, EqNeAttrs):
    bold: int = ...
    character_set: int = ...
    colour_index: int = ...
    escapement: int = ...
    family: int = ...
    font_index: int = ...
    height: int = ...
    italic: int = ...
    name: Any = ...
    struck_out: int = ...
    underline_type: int = ...
    underlined: int = ...
    weight: int = ...
    outline: int = ...
    shadow: int = ...

def handle_efont(book: Any, data: Any) -> None: ...
def handle_font(book: Any, data: Any) -> None: ...

class Format(BaseObject, EqNeAttrs):
    format_key: int = ...
    type: Any = ...
    format_str: Any = ...
    def __init__(self, format_key: Any, ty: Any, format_str: Any) -> None: ...

std_format_strings: Any
fmt_code_ranges: Any
std_format_code_types: Any
date_chars: Any
date_char_dict: Any
skip_char_dict: Any
num_char_dict: Any
non_date_formats: Any
fmt_bracketed_sub: Any

def is_date_format_string(book: Any, fmt: Any): ...
def handle_format(self, data: Any, rectype: Any = ...) -> None: ...
def handle_palette(book: Any, data: Any) -> None: ...
def palette_epilogue(book: Any) -> None: ...
def handle_style(book: Any, data: Any) -> None: ...
def check_colour_indexes_in_obj(book: Any, obj: Any, orig_index: Any) -> None: ...
def fill_in_standard_formats(book: Any) -> None: ...
def handle_xf(self, data: Any) -> None: ...
def xf_epilogue(self) -> None: ...
def initialise_book(book: Any) -> None: ...

class XFBorder(BaseObject, EqNeAttrs):
    top_colour_index: int = ...
    bottom_colour_index: int = ...
    left_colour_index: int = ...
    right_colour_index: int = ...
    diag_colour_index: int = ...
    top_line_style: int = ...
    bottom_line_style: int = ...
    left_line_style: int = ...
    right_line_style: int = ...
    diag_line_style: int = ...
    diag_down: int = ...
    diag_up: int = ...

class XFBackground(BaseObject, EqNeAttrs):
    fill_pattern: int = ...
    background_colour_index: int = ...
    pattern_colour_index: int = ...

class XFAlignment(BaseObject, EqNeAttrs):
    hor_align: int = ...
    vert_align: int = ...
    rotation: int = ...
    text_wrapped: int = ...
    indent_level: int = ...
    shrink_to_fit: int = ...
    text_direction: int = ...

class XFProtection(BaseObject, EqNeAttrs):
    cell_locked: int = ...
    formula_hidden: int = ...

class XF(BaseObject):
    is_style: int = ...
    parent_style_index: int = ...
    xf_index: int = ...
    font_index: int = ...
    format_key: int = ...
    protection: Any = ...
    background: Any = ...
    alignment: Any = ...
    border: Any = ...
