I retract my answer, and ask if anyone has a solution. I'm trying to create an echo that's a modification of the display of the ON TEXT event, and the solution only works in a channel.
The OP was correct that $cnick(nick).color is not returning the correct color number if that nick is being auto-colored to a random color. In those cases, it's instead returning:
$cnick($nick,1).color returns $color(listbox text)
$cnick($nick ).color returns $color(normal)
$cnick($nick ) returns N for the Nth matching rule
$cnick($nick ).auto returns $true if the nick matches an autocolor rule (even if the nick's color is not actually coming from that auto-rule)
The $nick($chan,$nick).color is not a complete solution because $nick() won't work in a query window where the auto-nick rule is coloring the speaker, because $chan being $null in a query window makes it an invalid parameter error, and $nick($nick,1) won't work either.
Even if I share a channel with the nick, I can't steal the color from $nick($chan,$nick).color unless their color in that channel comes from the auto-color rule, instead of from some other rule.
If I use /cline to turn a nick red, $nick().color is the only one that gives me true info about the nicklist nick being red, and $cnick().auto continues telling me that their nick matches an auto-color rule, but doesn't tell me that the nick isn't actually being autocolored.