Spaces:
Runtime error
Runtime error
Remove unused function
Browse files
app.py
CHANGED
@@ -117,12 +117,6 @@ background_color = color_picker('Background color', key="backgroundColor", defau
|
|
117 |
secondary_background_color = color_picker('Secondary background color', key="secondaryBackgroundColor", default_color=default_color.secondaryBackgroundColor, l_only=True)
|
118 |
|
119 |
|
120 |
-
def parse_hex(rgb_hex_str: str) -> tuple[float, float, float]:
|
121 |
-
if not re.match(r"^#[0-9a-fA-F]{6}$", rgb_hex_str):
|
122 |
-
raise ValueError("Invalid hex color")
|
123 |
-
return tuple(int(rgb_hex_str[i:i+2], 16) / 255 for i in (1, 3, 5))
|
124 |
-
|
125 |
-
|
126 |
st.header("WCAG contrast ratio")
|
127 |
st.markdown("""
|
128 |
Check if the color contrasts of the selected colors are enough to the WCAG guidelines recommendation.
|
|
|
117 |
secondary_background_color = color_picker('Secondary background color', key="secondaryBackgroundColor", default_color=default_color.secondaryBackgroundColor, l_only=True)
|
118 |
|
119 |
|
|
|
|
|
|
|
|
|
|
|
|
|
120 |
st.header("WCAG contrast ratio")
|
121 |
st.markdown("""
|
122 |
Check if the color contrasts of the selected colors are enough to the WCAG guidelines recommendation.
|