Can't able to fetch color code from product variant

Hi everyone,

I’m trying to fetch the HEX color code for each product variant from Shopify using the Admin API. In my store, each variant has a metafield set for its color:

  • Namespace: shopify.color-pattern

  • Key: color

  • Value example: #000000 (seen inside Shopify admin when I click Edit color)

However, I am still unable to retrieve this meta field via the Admin API.

if anyone one how to access color hex code do help me because i am making an app and i want to fetch all my products details to app (all is done except color code ) I am getting color name but not hex code

Perhaps share the code you’re using and any errors you’re receiving.