-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathbasic_python_styles.py
More file actions
95 lines (84 loc) · 2.35 KB
/
basic_python_styles.py
File metadata and controls
95 lines (84 loc) · 2.35 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
# Basic Python Styles - No dependencies needed!
# Just copy and run to see how styles look
# Colors in hex (like CSS)
COLORS = {
# Main colors
'primary': '#2B579A', # A nice blue
'secondary': '#4A9D4A', # Forest green
'accent': '#FFB900', # Warm yellow
# Text colors
'text_dark': '#333333', # Almost black
'text_light': '#FFFFFF', # White
'text_gray': '#666666', # Medium gray
# Background colors
'bg_light': '#FFFFFF', # White
'bg_dark': '#1E1E1E', # Dark gray (like VSCode)
'bg_code': '#F5F5F5', # Light gray for code
}
# Font sizes (in points)
SIZES = {
'tiny': 8,
'small': 10,
'normal': 12,
'large': 14,
'xlarge': 18,
'huge': 24
}
# Spacing (in points)
SPACING = {
'tight': 4,
'normal': 8,
'loose': 12,
'wide': 16,
'paragraph': 20
}
# Example styles for different elements
STYLES = {
'heading1': {
'font_size': SIZES['huge'],
'color': COLORS['primary'],
'spacing_before': SPACING['wide'],
'spacing_after': SPACING['normal']
},
'heading2': {
'font_size': SIZES['xlarge'],
'color': COLORS['primary'],
'spacing_before': SPACING['normal'],
'spacing_after': SPACING['tight']
},
'normal_text': {
'font_size': SIZES['normal'],
'color': COLORS['text_dark'],
'spacing_after': SPACING['normal']
},
'code_block': {
'font_size': SIZES['small'],
'color': COLORS['text_dark'],
'background': COLORS['bg_code'],
'spacing': SPACING['tight']
},
'quote': {
'font_size': SIZES['normal'],
'color': COLORS['text_gray'],
'spacing': SPACING['normal'],
'indent': SPACING['wide']
}
}
# Let's see how they look!
print("🎨 Python Style Guide Preview:")
print("=============================")
# Show color palette
print("\n📊 Color Palette:")
for name, hex_value in COLORS.items():
print(f"{name:15} {hex_value}")
# Show text sizes
print("\n📏 Text Sizes:")
for name, size in SIZES.items():
print(f"{name:10} {size}pt")
# Show example styles
print("\n🎯 Example Styles:")
for element, style in STYLES.items():
print(f"\n{element}:")
for property, value in style.items():
print(f" {property:15} {value}")
print("\n✨ Ready to make your documents beautiful! ✨")