Here's why:
* Nitric acid decomposes slightly: Even in the absence of light, nitric acid can decompose into nitrogen dioxide, water, and oxygen:
```
4 HNO₃ → 4 NO₂ + 2 H₂O + O₂
```
* Nitrogen dioxide dissolves in the acid: The resulting nitrogen dioxide dissolves in the nitric acid, giving it a yellow or brown color.
* Exposure to light accelerates decomposition: Exposure to light accelerates the decomposition process, making the discoloration more pronounced.
So, while pure nitric acid is colorless, the yellow or brown color you often see is a sign of decomposition and the presence of dissolved nitrogen dioxide.