First we have to find the sum of the given magic square that will be
26+21+28=75
Now,
22 + yellow block + 24 = 75
So, yellow block = 29
21 + Red block + 29 = 75
So, red block = 25
28 + green block + 24 = 75
So, green block = 23
Now, the sum of all coloured block will be
29 + 25 + 23 = 77