def register_effect_color(color: str) -> Callable[[type[Any]], type[Any]]:
  """Decorator to register a treescope-rendering color for a given effect.

  Args:
    color: The color to assign, as a CSS string.

  Returns:
    A decorator that can be applied to a protocol class to associate it with
    the given color.
  """

  def color_registration_decorator(cls):
    _EFFECT_COLORS[cls] = color
    return cls

  return color_registration_decorator
Decorator to register a treescope-rendering color for a given effect.

  Args:
    color: The color to assign, as a CSS string.

  Returns:
    A decorator that can be applied to a protocol class to associate it with
    the given color.
  
penzai/deprecated/v1/data_effects/effect_base.py