To keep the colour you love, wash in cool water, or nothing above 30 degrees Celsius. To prevent fading, turn your denim inside out.
Extreme heat can break down the fibres in your denim. Line-dry to encourage the creases to drop out.
Air-drying is best for preserving the fit of your denim. If drying outside, turn inside out and hang in the shade to avoid fading.
If you need to spin dry, do so on a low heat with the denim turned inside out, with all zips and buttons closed.