Color Display Name Matching Based on Handle

Topic summary

Goal: Automatically map shorthand variant color codes (e.g., BLK, YLW) to full display names (BLACK, YELLOW) across many products without manual editing.

Attempts: Matching via color swatches doesn’t update the option’s display name, and the store isn’t using visible swatches. A metaobjects-based approach (handle “blk” → label “BLACK”) forces creating a new color entry for every BLK instance, which isn’t scalable.

Proposed workaround: Bulk export products to CSV, replace codes with full names in Excel, and re-import to overwrite values.

Constraints: New products arrive daily; the client won’t do frequent exports/imports or manual renaming. They want an automated solution that updates the display name whenever a known code is used, ideally keyed off the handle/identifier.

Status: Unresolved. Open question: Is there a built-in or theme/metafields/metaobjects method to auto-relabel variant option values based on a code-to-name mapping without using swatches or recurring CSV updates? Screenshots of product page and swatch settings were provided but are not essential to the core issue.

Summarized with AI on December 26. AI used: gpt-5.

Hello! I urgently need to fix a bunch of colors in a store and am wondering if there is any way to automatically update a color name if I preset it.

For Example:

I have a variant color: BLK

I want it to change to BLACK automatically

(I have many products with this BLK color variant!)

I know I can “match” with color swatches, but that still does not update the Display Name - I’m also not using actual color swatches on the site. Maybe this can be handled in Metaobjects? I tried something like this but even then it is making me create a new color for every instance of BLK - even though I created the handle as blk and the Display Label as BLACK.

I’m desperate - I’m working on a project that needs to be completed by tomorrow night!

Hi @kvaras1969 ,
You’d like to change ‘BLK’ to ‘Black’ and ‘YLW’ to ‘yellow’, correct?

Here’s a streamlined approach:

-export all products,

-maintaining the handles, execute a query on Excel to change names in groups, and that’s it.

-Overwrite existing files to apply these changes.

I hope this assists you.

Best regards,

Dawood Mirza

Thank you so much for your reply!

The problem is that new products will be coming in daily. Their team does not want to take 3 seconds to type the name of the color from BLK to BLACK and has tasked me with somehow automating this process. The only way I can see how to color match is by using color swatches, but the client does not want to use color swatches for some reason. I know I could do the export and import, but they would have to do it too often, and I do not think they would like that solution. I’m surprised that when setting up colors in the swatch, the Alt text or display name does not change when the handle matches.

Thank you again for your reply. I need to continue to try and look for an automated solution - if there is one!