You can press the R, G, B, and A keys on your keyboard to display the red, green, blue, and alpha channels respectively. Or, you can also select a channel from the RGB dropdown menu in the top left corner.
Press one of the channel keys again to toggle back and display all channels.
TIP: If you press Shift while selecting the channel, your selection only affects the currently active input of the Viewer node. This way, you can display different channels from the Viewer’s different inputs. For example, when keying it can be useful to view the RBG channels from one input and the alpha channel from another, and toggle between the two. To achieve this, do the following:
1. Create a Viewer with several inputs. See Connecting Viewer Nodes.
2. Activate one of the inputs by pressing its number (for example 1) on the Viewer.
3. Press Shift and select RGB from the channel dropdown menu.
4. Activate another input (for example, input 2) by pressing its number on the Viewer.
5. Press Shift and select A from the channel dropdown menu.
6. Toggle between the inputs by pressing their numbers or the up and down arrow keys.