Critical angle is affected by the refractive index of second medium with respect to the first medium. This in turn depends on:
Wavelength: Critical angle increases with increase in wavelength (least for violet).
Temperature: Critical angle increases with increase in temperature.
formula
Relation between refractive index and critical angle
Let us consider medium 1 − Incident medium and 2 − Refractive medium, Then value of critical angle can be derived by Snell's law. n1sinθi=n2sinθr n1sinθcrit=n2sin90∘ sinθcrit=n1n2 sinθcrit=n121
n12 : Refractive index of denser medium 1 with respect to rarer medium 2.