# Copyright (c) 2010-2024 openpyxl # Builtins styles as defined in Part 4 Annex G.2 from .named_styles import NamedStyle from openpyxl.xml.functions import fromstring normal = """ """ comma = """ _-* #,##0.00\\ _$_-;\\-* #,##0.00\\ _$_-;_-* "-"??\\ _$_-;_-@_- """ comma_0 = """ _-* #,##0\\ _$_-;\\-* #,##0\\ _$_-;_-* "-"\\ _$_-;_-@_- """ currency = """ _-* #,##0.00\\ "$"_-;\\-* #,##0.00\\ "$"_-;_-* "-"??\\ "$"_-;_-@_- """ currency_0 = """ _-* #,##0\\ "$"_-;\\-* #,##0\\ "$"_-;_-* "-"\\ "$"_-;_-@_- """ percent = """ 0% """ hyperlink = """ """ followed_hyperlink = """ """ title = """ """ headline_1 = """ """ headline_2 = """ """ headline_3 = """ """ headline_4 = """ """ good = """ """ bad = """ """ neutral = """ """ input = """ """ output = """ """ calculation = """ """ linked_cell = """ """ check_cell = """ """ warning = """ """ note = """ """ explanatory = """ """ total = """ """ accent_1 = """ """ accent_1_20 = """ """ accent_1_40 = """ """ accent_1_60 = """ """ accent_2 = """ """ accent_2_20 = """ """ accent_2_40 = """ """ accent_2_60 = """ """ accent_3 = """ """ accent_3_20 = """ """ accent_3_40 = """ """ accent_3_60 = """ """ accent_4 = """ """ accent_4_20 = """ """ accent_4_40 = """ """ accent_4_60 = """ """ accent_5 = """ """ accent_5_20 = """ """ accent_5_40 = """ """ accent_5_60 = """ """ accent_6 = """ """ accent_6_20 = """ """ accent_6_40 = """ """ accent_6_60 = """ """ pandas_highlight = """ """ styles = dict( [ ('Normal', NamedStyle.from_tree(fromstring(normal))), ('Comma', NamedStyle.from_tree(fromstring(comma))), ('Currency', NamedStyle.from_tree(fromstring(currency))), ('Percent', NamedStyle.from_tree(fromstring(percent))), ('Comma [0]', NamedStyle.from_tree(fromstring(comma_0))), ('Currency [0]', NamedStyle.from_tree(fromstring(currency_0))), ('Hyperlink', NamedStyle.from_tree(fromstring(hyperlink))), ('Followed Hyperlink', NamedStyle.from_tree(fromstring(followed_hyperlink))), ('Note', NamedStyle.from_tree(fromstring(note))), ('Warning Text', NamedStyle.from_tree(fromstring(warning))), ('Title', NamedStyle.from_tree(fromstring(title))), ('Headline 1', NamedStyle.from_tree(fromstring(headline_1))), ('Headline 2', NamedStyle.from_tree(fromstring(headline_2))), ('Headline 3', NamedStyle.from_tree(fromstring(headline_3))), ('Headline 4', NamedStyle.from_tree(fromstring(headline_4))), ('Input', NamedStyle.from_tree(fromstring(input))), ('Output', NamedStyle.from_tree(fromstring(output))), ('Calculation',NamedStyle.from_tree(fromstring(calculation))), ('Check Cell', NamedStyle.from_tree(fromstring(check_cell))), ('Linked Cell', NamedStyle.from_tree(fromstring(linked_cell))), ('Total', NamedStyle.from_tree(fromstring(total))), ('Good', NamedStyle.from_tree(fromstring(good))), ('Bad', NamedStyle.from_tree(fromstring(bad))), ('Neutral', NamedStyle.from_tree(fromstring(neutral))), ('Accent1', NamedStyle.from_tree(fromstring(accent_1))), ('20 % - Accent1', NamedStyle.from_tree(fromstring(accent_1_20))), ('40 % - Accent1', NamedStyle.from_tree(fromstring(accent_1_40))), ('60 % - Accent1', NamedStyle.from_tree(fromstring(accent_1_60))), ('Accent2', NamedStyle.from_tree(fromstring(accent_2))), ('20 % - Accent2', NamedStyle.from_tree(fromstring(accent_2_20))), ('40 % - Accent2', NamedStyle.from_tree(fromstring(accent_2_40))), ('60 % - Accent2', NamedStyle.from_tree(fromstring(accent_2_60))), ('Accent3', NamedStyle.from_tree(fromstring(accent_3))), ('20 % - Accent3', NamedStyle.from_tree(fromstring(accent_3_20))), ('40 % - Accent3', NamedStyle.from_tree(fromstring(accent_3_40))), ('60 % - Accent3', NamedStyle.from_tree(fromstring(accent_3_60))), ('Accent4', NamedStyle.from_tree(fromstring(accent_4))), ('20 % - Accent4', NamedStyle.from_tree(fromstring(accent_4_20))), ('40 % - Accent4', NamedStyle.from_tree(fromstring(accent_4_40))), ('60 % - Accent4', NamedStyle.from_tree(fromstring(accent_4_60))), ('Accent5', NamedStyle.from_tree(fromstring(accent_5))), ('20 % - Accent5', NamedStyle.from_tree(fromstring(accent_5_20))), ('40 % - Accent5', NamedStyle.from_tree(fromstring(accent_5_40))), ('60 % - Accent5', NamedStyle.from_tree(fromstring(accent_5_60))), ('Accent6', NamedStyle.from_tree(fromstring(accent_6))), ('20 % - Accent6', NamedStyle.from_tree(fromstring(accent_6_20))), ('40 % - Accent6', NamedStyle.from_tree(fromstring(accent_6_40))), ('60 % - Accent6', NamedStyle.from_tree(fromstring(accent_6_60))), ('Explanatory Text', NamedStyle.from_tree(fromstring(explanatory))), ('Pandas', NamedStyle.from_tree(fromstring(pandas_highlight))) ] )