Pick color from dxt

Hello.

I’ve been trying to do color picking on my dxt images, which has proven to be difficult. I’ve found an algorithm to use to find the right index, but now i wonder if these color indices are available in the engine somewhere?