GLSL/HLSL- How to find out the colors of the pixels only on top of the UV shell border edges

Hi
Is there a way to find out the colors of the pixels only on top of the UV shell border edges using HLSL or GLSL?