Sorry. Once again, bad translation by King James's men. The correct translation of Joseph's famous
"coat of many colors" is a "long robe with sleeves." You can see why "coat of many colors" caught
on -- it has a much better ring than something that sounds like a fancy bathrobe. Such a robe is
mentioned again later in the Bible and is said to be the dress of a princess. Either Jacob was
conferring semi-royal status on Joseph or he wanted him to be a cross-dresser.
Why is the story of Joseph and his coat of many colors broken up by having
the story of Judah and the prostitute as Genesis chapter 38? Joseph has
just been sold as a slave to one of Pharaoh's officials in Egypt, and
suddenly a new story is told which has nothing to do with our Joseph story.
One answer offered by Kenneth C. Davis is this was done intentionally to
heighten suspense. "This is part of the brilliance of the Hebrew storytellers
who composed the Bible. You can imagine everyone sitting around a desert
campfire, listening to the story of Joseph. Just as the storyteller gets to
Joseph's fate, he shifts attention away with the accounts of Judah and Tamar.
The audience is left dangling. It is a technique that worked for Charles
Dickens, Saturday afternoon serials, and television soap operas. It keeps
the audience waiting expectantly."
 Kenneth C. Davis, Don't Know Much About The Bible, pg. 86
 ibid. pg. 89