Constraints on the quark matter equation of state from astrophysical observations