Recalculating final payment value on Civicrm Webform
Webform conditionals might work for you, if you:


Add the membership fee field as a hidden field
Set the value of it via conditional rules


Conditional rules can be along the lines of:


  if custom_field_color is blue then membership fee = $100
  
  if custom_field_color is yellow then membership fee = $50


Unfortunately they can't perform math so if you needed to combine multiple values you'd need something more sophisticated like custom code.