DO UP BROWN - 1. To swindle, victimize, trounce, or defeat (someone) thoroughly. 1824 in Partridge. He is said to be "cooked," or "done brown" and "dished." 2. To do (something) thoroughly, excellently, or perfectly. 1843 in G. W. Harris "High Times" 29: Those are places where things are done up brown! From "Random House Historical Dictionary of American Slang, Volume 1, A-G" by J.E. Lighter, Random House, New York, 1994.
DO IT UP BROWN - "Do something well; do it to one's satisfaction. In England the phrase has had the meaning of deceive or take in. Either way, it carries the implication of doing something thoroughly and probably comes from the roasting of meat, yielding a brown color that is the result of thorough cooking. One can see the term in the making in 'Liber Cure Cocorum' (1430)" 'Lay hur (the goose) to frye and rost hyr browne.'" From the "Dictionary of Cliches" by James Rogers (Ballantine Books, New York, 1985).
http://www.phrases.org.uk/bulletin_board/12/messages/668.html