Controlled tuning of the properties in optoelectronic self-sorted gels