New King James Version (NKJV)
Genesis 38
27 Now it came to pass, at the time for giving birth, that behold, twins were in her womb.
28 And so it was, when she was giving birth, that the one put out his hand; and the midwife took a scarlet thread and bound it on his hand, saying, "This one came out first."
29 Then it happened, as he drew back his hand, that his brother came out unexpectedly; and she said, "How did you break through? This breach be upon you!" Therefore his name was called Perez.
30 Afterward his brother came out who had the scarlet thread on his hand. And his name was called Zerah.
Genesis 39
1 Now Joseph had been taken down to Egypt. And Potiphar, an officer of Pharaoh, captain of the guard, an Egyptian, bought him from the Ishmaelites who had taken him down there.
2 The Lord was with Joseph, and he was a successful man; and he was in the house of his master the Egyptian.
3 And his master saw that the Lord was with him and that the Lord made all he did to prosper in his hand.
4 So Joseph found favor in his sight, and served him. Then he made him overseer of his house, and all that he had he put under his authority.
5 So it was, from the time that he had made him overseer of his house and all that he had, that the Lord blessed the Egyptian’s house for Joseph’s sake; and the blessing of the Lord was on all that he had in the house and in the field.
6 Thus he left all that he had in Joseph’s hand, and he did not know what he had except for the bread which he ate. Now Joseph was handsome in form and appearance.
7 And it came to pass after these things that his master’s wife cast longing eyes on Joseph, and she said, "Lie with me."