Help add saturation condition to a glsl shader

Hi, I have this vibrance shader, It has an srgb threshold which can be adjusted. But the shader affects all saturation levels. I would like to leave colors that have a saturation under 90% unaffected. And target the above 90% saturation pixels, with a smooth transition between them.
Any help would be appreciated :slightly_smiling_face:

//!PARAM vibr 
//!DESC Saturates/deSaturates 
//!TYPE float 
//!MINIMUM -1 
-0.3  

//!HOOK MAIN 
//!BIND HOOKED 
//!DESC Vibrance 
 
#define CoefLuma vec4(0.2126, 0.7152, 0.0722, 0) //sRGB, HDTV 
float Thresh = 45.0/255.0; 
float w = 10.0/255.0; 
 
vec4 hook() { 
vec4 c0 = HOOKED_texOff(0); 
float lum = (c0.r + c0.g + c0.b)/3.0; 
 
float colorSat = max(max(c0.r, c0.g), c0.b) -min(min(c0.r, c0.g), c0.b); // >=0, 5 arithmetic
vec3 sat = mix(vec3(dot(c0, CoefLuma)), c0.rgb, 1+vibr -colorSat*abs(vibr)); 
float delta = smoothstep( Thresh-w, Thresh+w, lum); 
c0.rgb = mix( sat, c0.rgb, delta); 
return c0; 
}