The reason being, is to stand out amongst others. Some believed with unique colors it could attracts Swiftlet to their farms.
Some believed that it works as a landmark for easy identification so the birds won't miss the farm and ended else where.
It is also another way of hypnotising the young Swiflets so that when they grow big they won't go to other farms.
(This farm has attracted many birds, look at the color)
Somehow or rather there is no study or research evidence shows that farms painted with unique colors attract birds to stay or birds population will grow.
The reason of most Entrance Holes are painted black is to create a contrast as the whole wall is white in color. This is to follow the cave concept where the lime stone caves are white and the hole/entrance are dark.
(It stand out from the light brown back ground)
But thru my observation it seemed this color contrast theory works. Some very successful farms indeed painted with colors, especially bright colors.
My conclusion is that to create a contrast similar to the Cave concept theory. I also believe easy identification is also part of it.
There are hundred perhaps thousand of farm where all looked almost the same from the sky therefore having a bright color would definitely stand out.
( you could see this farm from farm away)
So next time for a change you may want to paint your farm with bright colors. So that when yours birds come back in the evening they will know whose farm to go in.