We constrain the spatial gradient of star formation history (SFH) within galaxies using the colour gradients in NUV − u (where NUV stands for near-ultraviolet) and u − i for a local spatially resolved galaxy sample. By splitting each galaxy into an inner and an outer part, we find that most galaxies show negative gradients in these two colours. We first rule out dust extinction gradient and metallicity gradient as the dominant source for the colour gradient. Then using stellar population models, we explore variations in SFH to explain the colour gradients. As shown by our earlier work, a two-phase SFH consisting of an early secular evolution (growth) phase and a subsequent rapid evolution (quenching) phase is necessary to explain the observed colour distributions among galaxies. We explore two different inside-out growth models and two different inside-out quenching models by varying parameters of the SFH between inner and outer regions of galaxies. Two of the models can explain the observed range of colour gradients in NUV − u and u − i colours. We further distinguish them using an additional constraint provided by the u − i colour gradient distribution, under the assumption of constant galaxy formation rate and a common SFH followed by most galaxies. We find the best model is an inside-out growth model in which the inner region has a shorter e-folding time-scale in the growth phase than the outer region. More spatially resolved UV observations are needed to improve the significance of the result.