Input field has multiple color values over different states. How can i get current color value? Because I don’t see anything related to that atm.
you have to look at the targetGraphic.color as thats where its written to when the transition happens.
Tried that one and it returns the image component color without current transition color.
Had to look at repo for this one, and it seems it writes to the canvasRenderer.SetColor
UnityEngine.UI / UI / Core / Graphic.cs
private void CrossFadeColor(Color targetColor, float duration, bool ignoreTimeScale, bool useAlpha, bool useRGB)
{
....
colorTween.AddOnChangedCallback(canvasRenderer.SetColor);
....
}
In other words for someone who will look someday for this: InputField.targetGraphic.canvasRenderer.GetColor().
sorry my bad i took it as a different function call but you are correct.