While yellow is the traditional color for cowardice, Docter and crew used a richer, more vibrant version of the color for Joy, so that left purple for Fear (Bill Hader). "Fear was kind of, frankly, the leftover color
Purple is the sum of mixing red and blue together. Most of the time when people feel fear they may also feel emotions that are similar to sadness or anger