Damage done to the liver which causes jaundice makes urine dark colored as well as the skin and the whites of the eyes turning yellow.
The reason this happens is that because of the damage done to the liver by the virus, conjugated bilirubin can not pass through to the bile duct as it normally would and has to be excreted via the kidneys into the urine instead. the increased bilirubin in the urine will give it a dark color and the lack of it in the stool will cause it to be pale(not dark as your question mentioned).