Fish are able to see colors, and Betta fish, especially males are known to react to bright colors. That's why they have such a reaction when you place them near other fish that are brightly colored. However it's also not unusual for fish to have that reaction when they know you are going to feed them. If you feed your fish at the same time, then he is on a schedule and is probably reacting more to the expectation of food than he is the actual color of the jar. Chances are he has come to recognize the jar that holds the food he likes, and that's why he gets excited. Also if he doesn't like the pellets, then he wouldn't bother to get as excited when he sees that jar.
