With the limitations of the current version of the tracking, knowing which finger is the thumb isn't reliably possible. That being said, a few things you may find helpful:
If you want to see how similar two direction vectors are, a very nice tool is the dot product. This calculation is built into Unity's Vector3 type. Given two normalized direction vectors, the dot product will produce a number between -1 and 1. 1 Being the two vectors are pointed in the same direction, -1 being they are pointed in opposite directions.
It is defined as the sum of the product of the components of the vectors.
//Dot Product of two 3 dimensional vectors v1 and v2 = (v1.x * v2.x) + (v1.y * v2.y) + (v1.z * v2.z)
In Unity you can more easily do this, with two normalized direction vectors:
float dotProduct = Vector3.dot( v1, v2 ); //Where v1 and v2 are normalized Vector3's
So to figure out if something is pointing down in world space:
float amountDown = Vector3.dot(myDirectionVector, Vector3.down); // Where myDirectionVector is a normalized Vector.
Unfortunately, looking at the diagnostic visualizer when my hand is making a thumbs down, we're not accurately detecting fingers in that pose so you'd probably have to intuit a thumbs down from the rotation of the hand itself rather then seeing if the thumb (or any other finger) is pointing down.
You'd want to look for if the hand is pointed sideways. Basic detection for that could use the palm normal.
//Given a valid hand object
if(Math.abs(myHand.palmNormal.x) > 0.7 {
//My hand is pointed relatively sideways
}
This doesn't differentiate between thumbs up and thumbs down though. For that we'd need to know handedness, which we don't. One assumption we might make (one your UI would need to support) could be that the right hand is always on the right side of the device and the left hand is always on the left side of the device. That way we could figure out which direction of rotation we'd need.
So then we could do something like:
//Given a valid hand object
if(Math.abs(myHand.palmNormal.x) > 0.7 {
if(myHand.palmPosition.x > 0 && myHand.palmNormal > 0) { // Right hand
//Thumbs down
}
else if(myHand.palmPosition <= 0 && myHand.palmNormal < 0) { //Left hand
//Thumbs down
}
}
Looking at the data, I'm not convinced this would be an incredibly stable solution but I hope that at least points you in a helpful direction. It's notable that all these calculations assume the hand is facing forward, if you want to do things in terms of world space you'd want to rotate all the direction Vectors based on the inverse of the hand's rotation before running these calculations.