How do you correctly retrieve the in use color of the text of a Label VisualElement?

I have a CustomLabel:

[UxmlElement]
public partial class CustomLabel : Label
{
  [UxmlAttribute]
  public Color HighlightColor { get; set; } = Color.yellow;

  private Color m_prior_color;
  private bool  m_enabled_highlight;
 
  //=================================
  public bool EnableHighlight
  {
    get {  return m_enabled_highlight; }
    set {
      m_enabled_highlight = value;
      if (m_enabled_highlight) {
        m_prior_color = style.color.value;
        style.color = HighlightColor;
      } else {
        style.color = m_prior_color;
      }
    }
  }
}

UXML builder properly shows HighlightColor as a field and I can set it’s color value.
When I use code to set EnableHighlight = true, the color of the Label’s text changes correctly.
When I set EnableHighlight = false, the color of the Label’s text get’s set to RGBA(0,0,0,0) which is NOT what the original color was. The original color was white, as the color is actually unset/undefined.
When I explicitly set the color to something specific, I can properly see the new color, and change it to the HighlightColor, but again when I turn Highlight back off, it gets set to RGBA(0,0,0,0), and not the correct prior color.
When stepping through the code The value held by style.color.keyword has a value of “Null” and has the default RGBA(0,0,0,0) as the value retrieved from style.color.value. (explaining why it gets set to that via the above code)

From where do I read the correct original color value so I can save and restore it later? (Or is this a bug?)

Please do not suggest uss action themes like :hover, :active, :focus, etc. This is not my intent, I explicitly need to dynamically swap colors via code independently of those kind of trigger actions.

VisualElement.style is the styles you assign via code.

VisualElement.resolvedStyle is the current state of all styles after style sheets and code styles have been applied.

Thank you, that mostly worked. Mostly because I enable the highlight when a different control receives focus and I am setting the focus immediately when the uxml document is displayed. Apparently, styles are not fully resolved yet? I get a RGB(0,0,0,1) instead of its correct color. It does work on other controls that I trigger afterwards through various user interactions. I suspect I’ll need to delay a frame before assigning the focus which is the initial cause of the highlight trigger.

Edit: Confirmed, have to wait a frame for styles to resolve before triggering code that is going to read from resolvedStyle.