Sorry but I think you are a bit confused. A transparent medium different from vacuum space, can simultaneously refract and scatter visible light but this does not mean that these two phenomena are related. For visible light spectrum you can have a transparent medium which refracts light but practically does not scatter light like clear glass but also a medium like air which practically does not refract visible light (or tiny little) and only scatters light.
A homogeneous medium either refracts monochromatic light or in your case mentioned scatters light or both. If the material is refractive to a specific monochromatic light it will homogeneously twist the path of a non vertical incident beam of monochromatic light when passing through it. In case of a spectrum of light like for example white light it will cause due to different refractive indices to different wavelengths, frequency dispersion of the incident white light at an angle and split it to its color components and a colored spread out spectrum of light will exit the medium (like a rainbow) but this has nothing to do with the scattering phenomenon but the light gets spread out to its spectrum components due the different refraction indices.
Scattering is a total different phenomenon where incident monochromatic light gets deflected (bounced of) at multiple random angles to the forward direction and all different form the incident angle, from particles of a medium. In this case a monochromatic beam will be much spread out when it exits such a medium. In Rayleigh scattering the size (diameter) of the particles must be less than about ~$1/10$ David J. Lockwood the incident monochromatic wavelength of light for this to occur. When a light spectrum is incident to such a medium only a specific wavelengths components matching the above condition are scattered by the medium and the rest of the spectrum components get either refracted or Mie scattered or reflected or absorbed according the the medium particle's size and incoming wavelengths of light. In case of air particles and white mid-day sunlight, blue light component is mostly forward scattered and intensified and directed towards the Earth surface therefore the blue of the sky. During dawn or sunset light travels a much more thicker layer of atmosphere to reach to us therefore there is larger probability to blue light to be scattered to directions different from your straight line of sight and thus mainly the red (largest visible wavelength) which is not scattered by air reaches your eyes. Similar the mid-day sun disk on a clear sky appears yellowish because the dominant percentage of blue scattered light and red unscattered light mix, reaching your straight line of sight.
So Rayleigh scattering acts like a dynamic color filter.
In Mie scattering particle size must be larger than the incident wavelength. Deflection angles opposite to Rayleigh scattering are in average more shallow creating a color halo effect around the particle when irradiated with monochromatic light. In the case of the white light spectrum, a Mie scattering medium does not act selectively to specific color components but all wavelengths get more or less the same scattering amount effect (i.e. beam of white light gets spread out inside the medium without any coloring from the initial white). Examples of Mie scattering is milk, clouds and inhaled cigarette smoke. Mie scattering in the visible spectrum is usually related with white.
Actually there is a very nice demonstration of Rayleigh and Mie scattering by Prof. Walter Lewin of MIT:
https://www.youtube.com/watch?v=gitR_ikNOfM&t=5031s
Again, light refraction and light scattering are different phenomena and not related.

image source: link
In the above figure the laser monochromatic light is refracted by an angle $Θ$ and simultaneously spread out by light scattering effect of the medium inside the vial. Refracted photons pass through the particles and scattered photons bounce of the particles.