The hue cycles with phase as the wave expands. This is a visualization aid, not literal color. The slit emits many Huygens sources across width a.
We compute complex phase addition of all slit sources for each detector position y: θᵢ = k·rᵢ − ωt, amplitude ∼ eiθᵢ/rᵢ, then intensity(y) = |Σi eiθᵢ/rᵢ|².