How to add name on product variant

Suposing a template name like “Computer”
I would like to add a name in the variant like “Red” so the rec name of the variant should be “Computer Red”, how can I achive this?

You will have to extend the get_rec_name method to append your new content to the existing record name.