In the crystal structure of the title compound, C25H20N4, the triazinyl ring is nearly coplanar with the planar (r.m.s. deviation = 0.028 Å) phenylethenyl unit, the twist being only 5.8 (2)°; however, the planar carbazolyl unit (r.m.s. deviation = 0.008 Å) is twisted by 47.8 (1)° with respect to the phenylethenyl unit. The nonplanar nature of the molecule explains the phenomenon of light emission at short wavelengths in the solid state but at long wavelengths in solution