Blue and green spaces (BGs) play a critical role in mitigating the urban heat island effect, especially during heatwaves. However, limited research has been conducted on the impact of urban form factors on the cooling effect of BGs throughout the entire diurnal cycle. This study aimed to evaluate the cooling capacity of BGs in Wuhan, China, by considering the cooling distance (ΔLmax) and cooling intensity (ΔTmax) via the WRF-UCM model, considering the internal land use changes and spatial changes within the adjacent spaces of the BGs. The findings are as follows: 1) the BGs have a maximum ΔTmax (1.44 °C) and ΔLmax (2.15 km) during the daytime, which are reduced by 18.6 % and 85.4 %, respectively, at night; 2) during the daytime period, no green space within the BGs results in a greater ΔTmax and ΔLmax, while the law of diminishing marginal utility (LDMU) is disrupted by the disappearance of green spaces at night; and 3) open high-rise patterns show a larger ΔTmax and ΔLmax and lower Tmean in the daytime, with a smaller ΔLmax and higher Tmean at night. The diurnal Tmean is consistently lower for the greening strategy. High-rise and low-density patterns can expand the BG cooling capacity, but they bring new heat waves at night.