UVs go from 0 to 1 on 1UV face.
So you multiply your color by gradient that goes from 0 to 1, ofc, one edge will be black and opposite full color.
All faces are in same 1UV space? Then you cannot separately paint them by using uvs (they all are same foe each face).
Instead you can get face normal , calculate dot product to (1,0,0) and if its > 0.95. Face points in same direction. Dot Product is cosine, so to be accurate you can use some trigonometry to find smallest value for that cosine. But i think 0.95 should work.
Do it for all 6 faces, you will have way to find which face it is. Then use IF node. So If Dot product >0.95 = color for that face.