A Total of 6 chocolates are remaining in the bag..
Now, the possibility that all are of same colour, will be,
1. either all 6 are green chocolates..
2. Or, all 6 are blue chocolates..
Now, for 1st condition, we should have picked up 1 Green + 6 Blue + 5 Red chocolates..
= > Total number of favourable outcomes = (7C1) x (6C6) x (5C5) = 7
Now, for 2nd condition, we should have picked up 7 Green + 0 Blue + 5 Red chocolates..
= > Total number of favourable outcomes = (7C7) x (6C0) x (5C5) = 1.
So, now, finding the total number of possible outcomes = 18C12 = (18!) / {(12!) x (6!) = 18564
So, P(required) = (7 + 1) / 18564 = 8 / 18564 = 2/4641.