Magento 2 How to get child item id of configurable product by super attribute details?

Let’s assume you know configurable product id and used child product super attribute details.
Example from Magento Sample data configurable product name Chaz Kangeroo Hoodie,  Configurable product id is 67.
Super attribute Array details,

Using the bove details how we can get details of child item.

Refer below code snippet for Get child item id of a Configurable product by child’s Attribute details.

Call function,

Result is 52(Product name Chaz Kangeroo Hoodie-XS-Black). Using above way we got the child item data.

Magento 2 Get Attribute Swatch color hashcode by option id

We can get hash code value of specific visual swatch by swatch option id.
We have created Color Product attribute from Stores -> Attributes -> Product.
Color attribute code with Catalog Input Type for Store Owner set to Visual swatch.

Now We can get the color hash code by color option id using below code snippet.

Call getAtributeSwatchHashcode() function from template,

The result will be like color Red hashcode is #FF0000