I think this is a long-tailed blue butterfly, otherwise known as the bean butterfly. It’s a pest on beans and peas and also wild legumes. My only question about the identification is that the tail, normally seen where the black spots are, is not visible here. But it’s possible that this butterfly has suffered a bit of damage in that area. Some butterflies look so beaten up that it’s a wonder that they’re able to fly at all.
It’s resting on the flowers of a mamane tree.