What type of knapsack problem is this?
Multi-dimensional knapsack seem appropriate. The additional dimensions are 1 if item is in group A, else 0, 1 if item is in group B, else 0, 1 if item is green, else 0, ... The maximum weights of additional dimensions are 6, 2 and then 2 for each color.

The condition that there must be exactly 6 items from group A could be forced by an additional dimension -1 if item is in group A, else 0 and maximum weight of -6. However, this is awkward.