If you could provide more information on version of Drupal and if you are using Commerce modules?
We have done this in the past using Commerce Fancy Attributes module to display colors for products : https://drupal.org/project/commerce_fancy_attributes
From module page:
Example usage:
0) Enable this module.
1) Create a Color vocabulary, add a text field called "Color" that will hold hex values.
Go to the "Manage Display" screen of that vocabulary, click the tab called "Add to Cart form - Attribute", enable only the color field (with the label hidden, and using the "Color" formatter).
2) Create several terms with matching hex colors (Black: #000000, White: #ffffff, etc).
3) Add a Color taxonomy_term_reference field to a product type.
4) When you add the color field on the product type, tick the checkbox "Enable this field to function as an attribute field on Add to Cart forms." and select "rendered term" as option of the "Attribute selection widget".
The Add To Cart form will now show the colors.
Of course, imagefields can be used instead of "textfields holding hex values" rendered as images.