ultrasav 0.1.4__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,185 @@
1
+ """
2
+ Pastel Color Schemes for alternating_group_formats
3
+ These color sets can be used with the write_excel_with_merge and map_to_excel functions
4
+ to create professional, visually appealing Excel outputs with subtle pastel colors.
5
+
6
+ Each color set follows the pattern:
7
+ - First format: Darker pastel shade
8
+ - Second format: Lighter/white shade
9
+ - Both use professional font colors and subtle grey borders
10
+ """
11
+
12
+
13
+ # Classic Grey Scale (current default)
14
+ CLASSIC_GREY = (
15
+ {
16
+ "bg_color": "#F5F5F5", # Light grey
17
+ "font_color": "#1A1A1A", # Near black
18
+ "border": 1,
19
+ "border_color": "#D9D9D9",
20
+ "valign": "vcenter"
21
+ },
22
+ {
23
+ "bg_color": "#FFFFFF", # Pure white
24
+ "font_color": "#2C2C2C", # Charcoal grey
25
+ "border": 1,
26
+ "border_color": "#D9D9D9",
27
+ "valign": "vcenter"
28
+ }
29
+ )
30
+
31
+ # Alternative Pastel Green (More Muted)
32
+ # Subtle, professional green tones that are easy on the eyes
33
+ PASTEL_GREEN_MUTED = (
34
+ {
35
+ "bg_color": "#ECF0EC", # Muted sage
36
+ "font_color": "#1A1A1A", # Near black
37
+ "border": 1,
38
+ "border_color": "#D9D9D9",
39
+ "valign": "vcenter"
40
+ },
41
+ {
42
+ "bg_color": "#F8FAF8", # Barely green white
43
+ "font_color": "#2C2C2C", # Charcoal grey
44
+ "border": 1,
45
+ "border_color": "#D9D9D9",
46
+ "valign": "vcenter"
47
+ }
48
+ )
49
+
50
+ # Alternative Pastel Blue (Cooler)
51
+ # Cool, calming blue-grey tones for a modern look
52
+ PASTEL_BLUE_COOL = (
53
+ {
54
+ "bg_color": "#E8EFF5", # Cool blue-grey
55
+ "font_color": "#1A1A1A", # Near black
56
+ "border": 1,
57
+ "border_color": "#D9D9D9",
58
+ "valign": "vcenter"
59
+ },
60
+ {
61
+ "bg_color": "#F5F8FB", # Ice blue white
62
+ "font_color": "#2C2C2C", # Charcoal grey
63
+ "border": 1,
64
+ "border_color": "#D9D9D9",
65
+ "valign": "vcenter"
66
+ }
67
+ )
68
+
69
+ # Alternative Pastel Purple (Warmer)
70
+ # Warm, soft purple tones for a sophisticated appearance
71
+ PASTEL_PURPLE_WARM = (
72
+ {
73
+ "bg_color": "#F2E9F3", # Soft mauve
74
+ "font_color": "#1A1A1A", # Near black
75
+ "border": 1,
76
+ "border_color": "#D9D9D9",
77
+ "valign": "vcenter"
78
+ },
79
+ {
80
+ "bg_color": "#FAF6FB", # Whisper purple
81
+ "font_color": "#2C2C2C", # Charcoal grey
82
+ "border": 1,
83
+ "border_color": "#D9D9D9",
84
+ "valign": "vcenter"
85
+ }
86
+ )
87
+
88
+ # Alternative Pastel Indigo
89
+ # Deep, calming indigo tones for a refined, elegant look
90
+ PASTEL_INDIGO = (
91
+ {
92
+ "bg_color": "#E8EAF6", # Soft indigo
93
+ "font_color": "#1A1A1A", # Near black
94
+ "border": 1,
95
+ "border_color": "#D9D9D9",
96
+ "valign": "vcenter"
97
+ },
98
+ {
99
+ "bg_color": "#F5F6FA", # Whisper indigo
100
+ "font_color": "#2C2C2C", # Charcoal grey
101
+ "border": 1,
102
+ "border_color": "#D9D9D9",
103
+ "valign": "vcenter"
104
+ }
105
+ )
106
+
107
+
108
+ # Usage examples:
109
+ """
110
+ from func_meta_df_write_to_excel_v5 import map_to_excel
111
+ from pastel_color_schemes import PASTEL_GREEN_MUTED, PASTEL_BLUE_COOL, PASTEL_PURPLE_WARM
112
+ import polars as pl
113
+
114
+ # Your DataFrame
115
+ df = pl.DataFrame({...})
116
+
117
+ # Use Muted Green scheme
118
+ map_to_excel(
119
+ df,
120
+ "output_green.xlsx",
121
+ alternating_group_formats=PASTEL_GREEN_MUTED
122
+ )
123
+
124
+ # Use Cool Blue scheme
125
+ map_to_excel(
126
+ df,
127
+ "output_blue.xlsx",
128
+ alternating_group_formats=PASTEL_BLUE_COOL
129
+ )
130
+
131
+ # Use Warm Purple scheme
132
+ map_to_excel(
133
+ df,
134
+ "output_purple.xlsx",
135
+ alternating_group_formats=PASTEL_PURPLE_WARM
136
+ )
137
+ """
138
+
139
+
140
+
141
+
142
+
143
+ # Quick reference for all color schemes
144
+ COLOR_SCHEMES = {
145
+ "classic_grey": CLASSIC_GREY,
146
+ "pastel_green": PASTEL_GREEN_MUTED,
147
+ "pastel_blue": PASTEL_BLUE_COOL,
148
+ "pastel_purple": PASTEL_PURPLE_WARM,
149
+ "pastel_indigo": PASTEL_INDIGO,
150
+ }
151
+
152
+
153
+ def get_color_scheme(name: str):
154
+ """
155
+ Get a color scheme by name.
156
+
157
+ Parameters
158
+ ----------
159
+ name : str
160
+ Name of the color scheme. Options:
161
+ - 'classic_grey': Classic grey scale (default)
162
+ - 'pastel_green': Muted pastel green
163
+ - 'pastel_blue': Cool pastel blue
164
+ - 'pastel_purple': Warm pastel purple
165
+ - 'pastel_indigo': Deep pastel indigo
166
+
167
+ Returns
168
+ -------
169
+ tuple
170
+ Alternating group formats for the specified color scheme
171
+
172
+ Raises
173
+ ------
174
+ ValueError
175
+ If the color scheme name is not recognized
176
+
177
+ Example
178
+ -------
179
+ >>> from pastel_color_schemes import get_color_scheme
180
+ >>> map_to_excel(df, "output.xlsx", alternating_group_formats=get_color_scheme("blue_cool"))
181
+ """
182
+ if name not in COLOR_SCHEMES:
183
+ available = ", ".join(COLOR_SCHEMES.keys())
184
+ raise ValueError(f"Unknown color scheme: {name}. Available: {available}")
185
+ return COLOR_SCHEMES[name]