Using galform, a semi-analytical model of galaxy formation in the Λ cold dark matter cosmology, we study the rest-frame ultraviolet (UV) colours of Lyman-break galaxies (LBGs) in the redshift range 2.5 ≤ z ≤ 10. As the impact of dust on UV luminosity can be dramatic, our model includes a self-consistent computation of dust attenuation based on a radiative transfer model. We find that intrinsically brighter galaxies suffer stronger dust attenuation than fainter ones, though the relation has a large scatter. The model predicts galaxies with UV colours consistent with the colour selection regions designed to select LBGs in observational surveys. We find that the drop-out technique that selects LBGs based on two rest-frame UV colours is robust and effective, selecting more than 70 per cent of UV bright galaxies at a given redshift. We investigate the impact on the predicted UV colours of varying selected model parameters. We find that the UV colours are most sensitive to the modelling of dust attenuation and, in particular, to the extinction curve used in the radiative transfer calculation. If we assume a Milky Way dust extinction curve, the predicted UV continuum slopes are, in general, bluer than observed. However, we find that the opposite is true when using the Small Magellanic Cloud dust extinction curve. This demonstrates the strong dependence of UV colours on dust properties and highlights the inadequacy of using the UV continuum slope as a tracer of dust attenuation without any further knowledge of the galaxy inclination or dust characteristics in high redshift galaxies.