To add custom colors for swatches on product pages (which aren't set by default with code), please open the Custom color section > click Add Custom color > use the color picker to choose one and remember to add its display name