class_docstr: Static class with task instance state constants and color methods to avoid hard-coding.
class_docstr_tok: ["Static","class","with","task","instance","state","constants","and","color","methods","to","avoid","hard-coding","."]
docstr: Black&white colors for a state.
docstr_tok: ["Black","&","white","colors","for","a","state","."]
code: def color_fg(cls, state):
      """Black&white colors for a state."""
      color = cls.color(state)
      if color in ["green", "red"]:
          return "white"
      return "black"
  
file_path: airflow/airflow/utils/state.py
imports: from __future__ import annotations
  from enum import Enum
label_desc: Use image node_id 2 for calling the State obj's underlying member method code with example usage: obj.color_fg(cls, state) and returns: str, str