A π-conjugated system with flexibility and rigidity that shows environment-dependent RGB luminescence.