Full disclosure: My information on flyfishing for trout is, at the very best, most basic. So I did a little Google-fu and came up with an answer to a simple question I had to start this conversation.....can trout even see color? Answer I found:
"Trout do indeed have color vision, but it is limited to relatively clear, shallow, water and short distances, so at close range, the trout can see the full detail of color."
So from this I can assume that a fly line, being 9' away from the end of the fly tied on the leader, is not going to be very distinct in coloring. So for starters it becomes about shades that would best blend. You would not have to match blue for a blue sky, or white for cloudy or even gray for overcast. As long as you get a shade of grey/white/etc. that comes close to matching what is above you are already at a head start.
I think it is important to point out something Diver Dan said that is very important....trout are "smart", but not THAT smart. Actually I would say less smart and more genetically bred to be very cautious.
I am a hunter. And I see this exactly like hunting deer. With today's hunting supply market you would swear deer are running around the woods with night vision and tri-corders from Star Trek. You will actually see guys get into debates about which camo brand is the best, Mossy Oak vs. Realtree, etc. But the funny thing is that somehow our grandfathers managed to kill deer just as easily without super-fad camo and scent lok this, scent killer that. Since deer are color blind it makes little different anyways. It is, and always has been about, breaking up your outline. This is why you don't wear solid colors. It is something the military knows. I always wondered why they did not, in this age of hi tech cloth printing technology they still clung to the old three tone camo patterns. Well, I found out that 1) cost increases with each additional color added to a pattern, 2) when all you need is three contrasting colors to break up your pattern why spend that extra money for no added benefit? And remember, this is to fool other HUMAN beings, who are much smarter than a deer is. The eye of any living organism is limited by different factors. Even turkeys, who have some of the sharpest vision of any living creature, can not pick out a human in simple "military style" 3 color camo (I know, it is all I wore for many years
). The simple contrasting pattern breaks up an outline effectively.
So this brings us around to fly lines. I would offer up money on a bet that a line using three visible colors (say green, orange and white for example) would work just as well at camouflaging a line than a single color of, say, a light blue or white. And it would have the added benefit of being more visible to an angler. Of course you still have that pesky problem Dan pointed out, and that being the line casting a shadow. For that we will need one of those cloaking devices from the Predator movies.