What is the best way to calculate the price from selected line item field (a select line item field) What is the best way to calculate the price from selected line item field (List field or maybe taxonomy) in final price ?

Example: we sell T-shirt. We define a color (list) as line item field, (red, blue, black)
Then we want drupal to calculate the price with multiplying to the value specified for selected color.
Red = 4
blue = 5
black = 6
The concept is that we don't want to make different product for each option, instead we want to use line item field (Select list) to calculate the price. Maybe for T-shirt doesn't make sense but it fits in our need.

How we can accomplish this and what is the best way of doing it ? Rules or own module ?
How we can specify a value for each color option?

I am more interested in coding approach, because there are a lot of different options and we don't want to make many rules for those.
The only reason I used following solution, was because we didn't need to make a product type for variety of options we had, and we had a lot of options which didn't make sense to make it as individual product.

I used rules, if any one find better solution let me know, hope it will help someone.

1) defined an action function to multiply the price to a coefficient 

2) checked to see what option has been selected and proper coefficient has been applied

/**
 * Rules action: multiply the unit price by some amount.
 */
function modulename_unit_price_multiply($line_item, $amount, $component_name, $round_mode) {
  if (is_numeric($amount)) {       
    // Coefficient variable
    $cf = '1';
    if(isset($line_item-&gt;field_color[LANGUAGE_NONE][0]['value'])){
        $selected_color = $line_item-&gt;field_color[LANGUAGE_NONE][0]['value'];
        switch ($selected_color){
            case 'red': 
                $cf *= 2;
                break;
            case 'black':
                $cf *= 3;
                break;
           case 'blue':
                $cf *= 4;
                break;
            }          
    } else {
        $cf *= '1';
    }  
    $wrapper = entity_metadata_wrapper('commerce_line_item', $line_item);
    $unit_price = commerce_price_wrapper_value($wrapper, 'commerce_unit_price', TRUE);

    // Calculate the updated amount and create a price array representing the
    // difference between it and the current amount.
    $current_amount = $unit_price['amount'];
    $updated_amount = commerce_round($round_mode, $current_amount * $amount * $cf);

    $difference = array(
      'amount' =&gt; $updated_amount - $current_amount,
      'currency_code' =&gt; $unit_price['currency_code'],
      'data' =&gt; array(),
    );

    // Set the amount of the unit price and add the difference as a component.
    $wrapper-&gt;commerce_unit_price-&gt;amount = $updated_amount;

    $wrapper-&gt;commerce_unit_price-&gt;data = commerce_price_component_add(
      $wrapper-&gt;commerce_unit_price-&gt;value(),
      $component_name,
      $difference,
      TRUE
    );
  }
}