Product Variant Pricing Formulae

Hello all!

Just wondering if it possible either through ERPNext or some module that someone has developed to create a formulaic pricing rule based on product variants.

Say we have a product called “Shirts”, with two properties, Colour(Red, Blue, Yellow), and Size(Small, Medium Large).

Base price is $30, and variants give:
Small: +0
Medium: +10
Large: +20
Red: +5
Blue: -5
Yellow: +0

Instead of creating each individual product variant and defining 9 separate specific prices, is there a way to create a pricing method based on the above rules? If not, is there an add-on module that has this functionality?

Thanks in advance!

No, you have to develop the functionality according to the scenario