whitphx HF staff commited on
Commit
a897a99
1 Parent(s): 72308e4

Add an explanation about WCAG

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -64,6 +64,9 @@ def parse_hex(rgb_hex_str: str) -> tuple[float, float, float]:
64
 
65
 
66
  st.header("WCAG contrast ratio")
 
 
 
67
 
68
  def synced_color_picker(label: str, value: str, key: str):
69
  def on_change():
@@ -96,7 +99,6 @@ with col3:
96
  st.header("Config")
97
 
98
  st.subheader("Config file (`.streamlit/config.toml`)")
99
- # st.markdown("`.streamlit/config.toml`")
100
  st.code(f"""
101
  [theme]
102
  primaryColor="{primary_color}"
 
64
 
65
 
66
  st.header("WCAG contrast ratio")
67
+ st.markdown("""
68
+ Check if the color contrasts of the selected colors are enough to the WCAG guidelines recommendation.
69
+ For the details about it, see some resources such as the [WCAG document](https://www.w3.org/WAI/WCAG21/Understanding/contrast-minimum.html) or the [MDN page](https://developer.mozilla.org/en-US/docs/Web/Accessibility/Understanding_WCAG/Perceivable/Color_contrast).""")
70
 
71
  def synced_color_picker(label: str, value: str, key: str):
72
  def on_change():
 
99
  st.header("Config")
100
 
101
  st.subheader("Config file (`.streamlit/config.toml`)")
 
102
  st.code(f"""
103
  [theme]
104
  primaryColor="{primary_color}"