Click to choose colour

If I am editing on the resource pack editor or skin editor how can I pick a color from the original skin or item? If I want to edit the diamond sword for example, and I want the color from the original item