Create 2 taxonomies:
- Background color, with terms white, black, green, blue, yellow
- Surface, with terms glossy or matte.
For each prod type, add field "Background color", which is a field "term referenace" (and refer to the Background color taxonomy).
Attentionn: make sure to check the option "attribute field settings" (enables this field to function as an attribute field on the add-to-cart-form).
Then add a similar term reference field "Surface".
store / products / add product to add individual products, with a specific SKU, and for which you pick the right values for each of both taxonomies.
So for "Matte surface", you should create 5 individual products (one for each background color). But for "Glossy surface", you only create 2 individual products (1 with a white background color, and 1 with a black background color)
For a more detailed video tutorial of the steps described above, refer to Drupal Commerce - Pruduct Attributes (16:13). Before doing so, you may want to first view these related videos:
By only reviewing/studying these 3 videos (total time = about 37 mins), you'll have a very good foundation to get started with the fundamentals of Drupal Commerce.
Managing products (and orders) can be confusing. However, the Commerce Backoffice module helps with that. For more details about that module, refer to my answer to the question about
Correct way for Attributes in Commerce