I don't see the utility of this compared to simply showing 'passwords are identical / not yet identical' live. Perhaps I'm missing something. OK, so a user makes a mistake, and they notice their n characters in the first field and their n characters in the second field generate different colors. How does this help them determine which of the two fields has what they intended to enter? Also since the user types each f…
Your average user is going to be completely perplexed by this and have no idea what it's even for. I would argue that this is far less usable for the average user than the old-fashioned implementation of clicking 'Submit', doing a non-AJAX round-trip, and then displaying a message that the passwords don't match.