What is the function of a character foil in Greek tragedy?

A.
A foil provides background information to the audience.

B.
A foil comments on events of the play and advises characters.

C.
A foil undergoes a change that marks the turning point of the plot.

D.
A foil reveals another character's traits through contrast.