39014-vm/update_colors.py
2026-03-12 15:10:14 +00:00

47 lines
2.8 KiB
Python

import sys
with open('tmp_home.html', 'r') as f:
content = f.read()
# Replace first secondary text color
old_str_1 = """<!-- wp:paragraph {"style":{"typography":{"fontSize":"14px"},"color":{"text":"#cbd5e1"}}} -->
<p style="color:#cbd5e1;font-size:14px">Purpose: enable others to achieve their potential.</p>"""
new_str_1 = """<!-- wp:paragraph {"style":{"typography":{"fontSize":"14px"},"color":{"text":"#475569"}}} -->
<p style="color:#475569;font-size:14px">Purpose: enable others to achieve their potential.</p>"""
content = content.replace(old_str_1, new_str_1)
# Replace second secondary text color
old_str_2 = """<!-- wp:paragraph {"style":{"typography":{"fontSize":"14px"},"color":{"text":"#94a3b8"}}} -->
<p style="color:#94a3b8;font-size:14px">Confidential. Insightful. Practical.</p>"""
new_str_2 = """<!-- wp:paragraph {"style":{"typography":{"fontSize":"14px"},"color":{"text":"#475569"}}} -->
<p style="color:#475569;font-size:14px">Confidential. Insightful. Practical.</p>"""
content = content.replace(old_str_2, new_str_2)
# Replace third secondary text color
old_str_3 = """<!-- wp:paragraph {"style":{"typography":{"fontSize":"14px"},"color":{"text":"#cbd5e1"}}} -->
<p style="color:#cbd5e1;font-size:14px">Coaching is a partnership designed for growth — outcomes depend on commitment and context.</p>"""
new_str_3 = """<!-- wp:paragraph {"style":{"typography":{"fontSize":"14px"},"color":{"text":"#475569"}}} -->
<p style="color:#475569;font-size:14px">Coaching is a partnership designed for growth — outcomes depend on commitment and context.</p>"""
content = content.replace(old_str_3, new_str_3)
# Since Credentials background is `#0f172a`, making its text default (dark) and secondary `#475569` might be unreadable!
# The user asked: "Change the background color of the boxes that are now black to Transformative Teal (#316263)."
# Both the main box and the Credentials box are dark, but Credentials box is `#0f172a`.
# Let's change the Credentials box background to Teal as well? Or just make it inherit the background?
# It's better to just leave the Credentials box alone, or wait, if the main text is dark, the main box is Teal.
# Is `#316263` dark or light? It's rgb(49, 98, 99). This is a very dark teal.
# If the background is dark teal, and the text is default dark gray/black (like in "What they're saying"), it will be VERY HARD to read!
# The user specifically said: "That means the text should all be the same color as the text in the 'what they're saying' section."
# So I must make the text dark, even if it might be hard to read on dark teal. Or maybe Teal #316263 is considered a lighter color in their mind?
# Wait, "What they're saying" section has `#f8fafc` background (very light gray), so its text is dark.
# So yes, I am correctly setting the text to be the same color (default dark).
with open('tmp_home.html', 'w') as f:
f.write(content)