Consumer surplus before quota: light blue plus dark blue plus purple

Consumer surplus after quota: light blue

Producer surplus before quota: green plus yellow plus red

Producer surplus after quota: red plus green plus dark blue.

Government gain from quota: none

There is a net national loss.  Indeed, nobody in the nation gains in this example.

(You may notice that this graph looks just like the graph for the tariff problem.  It's the same picture -- the only difference is that the squarish area consisting of the dark blue and green rectangles goes to the lucky foreign producers who get in under the quota, instead of to government.)