What's the default Nexus 4 indicator LED behavior? What is the default behavior of the Nexus 4 indicator LED? When is it lit, in what colors, and why?

Google's official Nexus 4 documentation doesn't apparently cover the LED. I googled and found apps or articles on how to customize the LED behavior, or reviews mentioning the LED without further details, but no descriptions of how it's supposed to work by default.
99% of the time the LED means "new, dismissable notification". I am unsure exactly how the LED color is chosen, but it seems to be based off the homescreen icon of the app; IMO has a blue icon/LED, Messanging (texts) has a green icon/LED, and Gmail has a while icon/LED. The color is consistent each notification from the app, so you will learn which color means which sort of notification.

You can also apparently control it via applications (and presumably by tinkering with system settings somehow): Light Flow can set the colors for Nexus 4 notifications per-app. I haven't tried it myself, but it claims Nexus 4 support.

You can see (I believe) all the colors the LED can show in this (surprisingly long) video. Most of the colors chosen are easily distinct to anyone with typical color vision. If you have partial colorblindness or apps with overlapping notification colors, the notification color changing apps might be of use to you.

The LED can also Flash red when the battery is extremely low and the device won't otherwise turn on.