parameters: ()
return_statement: return warningColorString
docstring: A shade of red, adapted to darkmode if possible. Targets a minimum 7:1 contrast ratio.
docstring_summary: A shade of red, adapted to darkmode if possible. Targets a minimum 7:1 contrast ratio.
docstring_tokens: A shade of red adapted to darkmode if possible . Targets a minimum 7 : 1 contrast ratio .
function: def warning_color_string() -> str:
      """A shade of red, adapted to darkmode if possible. Targets a minimum 7:1 contrast ratio."""
  
      warningColorString = "rgb(255,0,0)"
      if hasattr(QtWidgets.QApplication.instance(), "styleSheet"):
          # Qt 5.9 doesn't give a QApplication instance, so can't give the stylesheet info
          if "dark" in QtWidgets.QApplication.instance().styleSheet().lower():
              warningColorString = "rgb(255,105,97)"
          else:
              warningColorString = "rgb(215,0,21)"
      return warningColorString
function_tokens: def warning_color_string ( ) -> str : warningColorString = "rgb(255,0,0)" if hasattr ( QtWidgets . QApplication . instance ( ) , "styleSheet" ) : # Qt 5.9 doesn't give a QApplication instance, so can't give the stylesheet info if "dark" in QtWidgets . QApplication . instance ( ) . styleSheet ( ) . lower ( ) : warningColorString = "rgb(255,105,97)" else : warningColorString = "rgb(215,0,21)" return warningColorString