Euclid's Proposition 22 from Book 3 of The Elements states that in a cyclic quadrilateral, opposite angles sum to 180°.
The lines from the center of the circle to the four vertices are all radii. Therefore those lines have the same length, making the triangles isosceles, and so the angles of the same color are the same.
If the circumcenter (the blue dots) lies inside the quadrilateral, the quadrilateral consists of two angles of each color and its angle sum is 360°. The opposite angles of the quadrilateral consist of an angle of each color, hence their sum is 180°. If the circumcenter lies outside, then a similar result holds, except that the angles of the quadrilateral are now, say, red + blue + green - yellow.
If we cross the vertices over to form a reflex quadrilateral, the theorem does not hold.