If you'd like sold-out color swatches to remain visible (but unselectable) on your product page, you'll need to disable the Linked Options widget.
This widget is designed to hide out-of-stock variants entirely, so once disabled, all swatches will appear—including those sold out—with an “X” or grayed-out styling.
With Linked Options
Without Linked Options
How to Disable the Linked Options Widget
STEP 1
Access your Shopify Admin's Theme Library to open the theme customizer.
STEP 2
Click on the Theme settings icon.
STEP 3
Open the⚡Paid widgets tab and UNtoggle the Linked Options option.