I created a quadrilateral using the straight lines tool and another two dashed lines to have four quadrilaterals. I want to assign four different colors to each of them.
How can I do that?
Enable advanced snapping options as follows
With the Bézier tool B, draw each colour piece as a closed shape, select a fill, no stroke, and send to the back End
Another method would be to construct in a similar way, but with simple squares instead, group them, and then apply a Perspective/Envelope Live Path Effect, set to "Envelope deformation". Then move the control nodes using the Edit Paths by Nodes tool N