Electrochromic materials change color when a current is applied1, 2. These materials can be used for applications such as smart windows, wherein the transmittance is controlled, allowing for privacy and energy efficiency benefits3,4,5. To be useful, it is important for the transition to be fast (typically a few seconds), reversible over many cycles (>1000), and of the correct color change (absorb across the whole visible spectrum), and the materials to be cost-effective (both in terms of synthesis and in needing little power, less than 1 V, to effect the color change) and easily processable.

Many electrochromic materials are based on inorganic materials such as transition metal oxides1, 6,7,8. Whilst effective, processing and coating methods for these materials are generally energy intensive. Metal electrodeposition has also been used9. As alternatives, organic materials can be used10, 11, and have many advantages including solution processability, low switching times, color tunability, and high coloration.

A real challenge for smart windows is to achieve neutral shades such as grey and black, from a film with a transparent initial state. Many polymer films for example have a colored initial state as well as a colored final state11. Transmissive-to-black electrochromic materials are more difficult to form, since it is difficult to tune the absorption properties of the redox states such that a black color is possible. This has been achieved however for certain polymer films containing donor- π-donor polymers and carefully controlled co-polymers10, 12. As a different approach, some metal organic frameworks can be used as electrochromic materials. For example, a naphthalene diimide (NDI)-based metal organic framework which has been shown to undergo fast transparent to dark optical transitions, has been suggested as being useful for electrochromic devices13. A black color could be obtained by balancing the amount of radical anion and dianion at a ratio of 1:1. Nevertheless, there is still a significant opportunity to design a low cost, effective material capable of a reversible, stable, and fast change from transparent to black.

Electrochromic devices must include at least two electrodes and an electrolyte layer. The color change results from the electrochromic species going from bleached (giving rise to the transparent state) to the colored state. Generally, current electrochromic devices are classified into three categories2, 14. The first is where the colored and bleached species are both soluble in the electrolyte. The second is where the bleached state is soluble whilst the colored state coats one of the electrolytes. The third case is where both the bleached and the colored species coat an electrode.

Gel electrolytes are clearly a desirable feature of these devices, as this reduces issues of leaking for example in case of a fault in the device. Gel electrolytes have been reported as part of electrochromic devices2, 14, 15. However, there are no examples to the best of our knowledge where the gel matrix itself has been shown to be an effective means of forming transparent-to-black smart windows; in this case, neither the bleached nor the colored state is soluble, nor does either coat an electrode. This would therefore represent a new type of electrochromic device. Potential advantages here include limited diffusion in a system where the matrix is essentially solid, meaning that it should be possible to localize color changes, and limited migration of species to either electrode which might lead to degradation of the device with time.

To produce such an electrochromic device, we focus here on NDI based gelators16,17,18,19. NDIs are known to be easily reduced to the radical anion and dianion20, 21. The radical anions are good chromophores that absorb strongly in the visible and near-infrared. Indeed, it is possible to chemically modify the NDI core such that the full visible spectrum is absorbed16. A number of NDIs have been shown to be effective low molecular weight gelators, small molecules that can self-assemble into a fibrous network that can immobilize a solvent. A number of specific electrochromic NDI based gels have been previously reported and shown to absorb in the near infra-red on reduction to the radical anion22. In related work, in the solid state, photochromic formation of the NDI radical anion can result in changes from yellow to black, as long as the interplanar distance between NDI molecules is small, allowing effective π-electron delocalization23. Important work from Miller in the early ‘90 s discussed the idea of NDIs that formed so-called π-stacks when reduced in water, leading to strong absorption in the near-infrared24. However, to the best of our knowledge, NDIs gels have not been shown to be useful for transparent-to-black devices.

Here we show a simple NDI based hydrogel system that can undergo a color change from transparent-to-black caused by either photo- or electrochemical stimulation. This black color can be reversed by the oxidation of the reduced species either by air or by electrochemical oxidation. This leads to a hydrogel that can reversibly change color for many cycles with no degradation in color intensity or speed of response.


Gel formation and characterization

The NDI used here (1, Fig. 1a) is functionalised at each of the imide positions with a dipeptide, GlyPhe. 1 was synthesized by directly coupling the pre-synthesized dipeptide to naphthalene-1,4,5,8-tetracarboxylic acid dianhydride using a standard protocol. Addition of 2 molar equivalents of sodium hydroxide to a suspension of 1 in water or water/glycerol mixtures (80/20; we use this ratio throughout) results in dissolution of the NDI. Since we will be discussing electrochemical measurements below, all these data are provided for systems containing a background electrolyte of 0.1 M NaCl, but the data do not differ significantly in pure water or water/glycerol. For the solution prepared in water/glycerol (Fig. 1b), cryo-TEM shows the presence of essentially spheres only (Fig. 1c and Supplementary Figure 1). The small angle neutron scattering (SANS) data for the solution in water/glycerol shows weak scattering that fits well to a power law (Fig. 1d and Supplementary Table 1). This is consistent with the cryo-TEM data; we have seen similar scattering for spherical structures which are in equilibrium with free molecules from related gelators25.

Fig. 1
figure 1

Characterization of the hydrogels and solutions a Chemical structure of 1; b Photograph of a solution and a gel of 1 in water/glycerol (80/20); c cryo-transmission electron microscopy (TEM) of a solution of 1 in water/glycerol; d Small angle neutron scattering (SANS) data for a solution of 1 in water/glycerol (80/20). The black data are for the sample as prepared, red data are after irradiation with a 365 nm light emitting diode (LED) for 5 minutes, and blue data are after being allowed to relax for 8 h (note the black and blue data essentially overlay); e cryo-TEM for a gel of 1 in water/glycerol (80/20); f SANS data for a gel of 1 in water/glycerol (80/20). The black data are for the sample as prepared, red data are after irradiation with a 365 nm LED for 5 min, and blue data are after being allowed to relax for 8 h (note the black and blue data essentially overlay). Scale bar for (c) and (e) is 500 nm

Gels can be formed in water or water/glycerol mixtures by acidification of the solutions. Here, we use the hydrolysis of glucono-δ-lactone (GdL) to bring about a slow, uniform pH change26, 27. In water, the minimum gelation concentration is 0.625 mg/mL (Supplementary Figure 2). Cryo-TEM shows the presence of fibers as expected (Fig. 1e and Supplementary Figure 3). Unfortunately, attempts at increasing the magnification resulted in melting and/or damage to the film due to the he high energy of the electron beam.

The SANS data for the gels in water/glycerol can again be fitted to a power law, similarly to some PBI-based gels we have previously studied (Fig. 1f and Supplementary Table 2)28. These data imply that the structures that are scattering are outside the accessible Q-range over which the data were collected, suggesting that the scattering is from a surface generated by the fibers, as opposed to the fibers themselves29. From a rheological perspective, the gels behave as typical low molecular weight gels. The storage modulus (G′) and loss modulus (G″) are relatively frequency independent, and the gels break at around 10% strain (Supplementary Figure 4).

Photochromic response

In water or water/glycerol mixtures as either solutions or gels, the absorption spectra are typical of an NDI, with a strong absorption below 400 nm (Figs. 2a, b). The spectra only change in intensity on dilution, with no changes in peak position, implying that there are no changes in the self-assembled structure on dilution. Visually, the samples range from transparent to pale yellow as the concentration is increased and the thickness of the sample increases. Photoreduction of 1 can be achieved using a 365 nm LED. On irradiation, both the solution and the gel turn from the initial color to very dark brown to black depending on the concentration of 1 and the duration and intensity of the irradiation (Fig. 2c).

Fig. 2
figure 2

Formation of the radical anion. a UV–Vis absorption spectra for solutions of 1 in water/glycerol. The black data are as prepared and the red data are after irradiation with a 365 nm LED for 5 min; b UV–Vis spectra for gels of 1 in water/glycerol. The black data are as prepared and the red data are after irradiation with a 365 nm LED for 5 min. c Photograph of (from left to right) a solution of 1 as formed, a solution of 1 just after irradiation with a 365 nm LED and then recovered. d a gel of 1 as prepared, and a gel of 1 after irradiation and recovered. For c and d, the scale bar represents 1 cm. e Cyclic voltammograms (CVs) run at different scan rates from 0.02 to 0.8 V/s. The arrow shows the direction of increasing scan rates. f Electrochemically generated state (black) compared to the photogenerated state (red) for the solutions of 1

This color change can be linked to the formation of the radical anion, as shown by the presence of new peaks at 460 nm in the UV–Vis absorption spectra with a broad tail for both the solution and the gel (Figs. 2a, b). There are differences in the absolute absorbances for the solution and the gel even though the color achieved is very similar by eye. This suggests that only a certain amount of radical is needed to be present to create the desired color, and anything exceeded this value does not contribute to the intensity of the color. There is no evidence of the dianion being formed from the UV–Vis absorption spectrum as shown by the absence of a peak at around 400 nm. There are many examples of color changes arising from the formation of the radical anion, but these tend to be green or blue. However, NDIs have been shown to assemble into so-called π-stacks when the radical anion is formed in water, which absorb strongly in the near infra-red region from 900 nm24.

Generation of the radical anion does not result in the gel being destroyed, as perhaps might be expected considering the introduction of charge into the self-assembled structures. This may be due to radical-π interactions30. We previously reported that generation of the radical anion in a related perylene diimide gel resulted in a change in the rheological data28. Very unusually, the gels became stronger on irradiation. Here, on irradiation of a gel of 1, the absolute values of the storage and loss modulus do not change significantly (Supplementary Figure 4). However, the strain at which the gel breaks increases. Hence, again, we have highly unusual behavior for a photoresponsive gelator where irradiation leads to an improvement in the gel properties; in almost all reported cases, irradiation leads to destruction of the gel phase31. The SANS data for the solutions (Fig. 1d) and gels (Fig. 1f) after irradiation show slight changes. For the solution, the data still fit to a power law, albeit with a slightly lower power law value of 2.89 ± 0.02 as compared to 3.30 ± 0.05 before irradiation. The cryo-TEM shows the presence of spheres as for before irradiation (Supplementary Figure 5). Over time, the solution returns to its original color, and the SANS data return to being almost identical to the as-prepared sample (Fig. 1d). For the gels, the data for the as-prepared sample can be fitted to a power law (see above). After irradiation, the data are instead best fitted to to Equation 1:

$$I\left( Q \right) = \frac{A}{{Q^n}} + \frac{C}{{\left( {1 + \left( {Q\xi } \right)} \right)^m}} + B$$

where the network scattering is described by the first term and the morphology by the second term32. n and m represent the fibril densities at low Q and high Q scattering, respectively. The correlation length, ξ, represents the distance between crosslinks. From the fit, n and m are both close to 3 (3.01 ± 0.01 and 3.60 ± 0.15, respectively), with ξ being 29.3 ± 0.9 Å. After recovery, the data are very similar to that for the original gel, and again can be fitted to a power law. Whilst difficult to interpret exactly (the equation above is semi-empirical), the data show that irradiation leads to changes in the structures forming the gel, but these changes are reversible. Cryo-TEM shows that the fibers are very similar to those before irradiation (Supplementary Figure 6). Fibers before irradiation had an average diameter of 7.7 nm and after irradiation of 6.9 nm, so had slightly decreased in width, although the distribution of fiber widths increases upon irradiation (Supplementary Figure 7). Again, the data after the gel has returned to the original color are essentially identical to those as prepared. Fourier-transform infrared spectroscopic (FTIR) data collected for both the gel and solution before and after irradiation with 365 nm show little change in the spectra, although this data is difficult to interpret due to the large amount of water present in the samples (Supplementary Figure 8). Electron paramagnetic resonance (EPR) of the photogenerated state was also collected for the solution and the gel after irradiation with 365 nm LED (Supplementary Figure 9). For both the solution and gel systems33 the signal is consistent with the generation of the NDI radical anion species as supported by the parameters obtained from the simulation20.

Electrochromic response

Importantly, the radical anion, and associated color change, can also be generated electrochemically. The radical anion of 1 can be formed reversibly by a one-electron charge transfer processes as shown by cyclic voltammetry (Fig. 2e and Supplementary Figure 10). The formation of the radical anion was confirmed using spectroelectrochemistry and the UV-Vis absorption spectra are very similar in both cases (Fig. 2f). The kinetics of the grow in and decay of the radical anion could be monitored using the spectroelectrochemical cell. It showed that the grow in of the radical was quicker than the decay of the radical, this is due to diffusion limitations within the cell (Supplementary Figure 11).

The color change from transparent to dark that was possible with solutions and gels of 1 suggests applications in electrochromic windows. To show this, we built a sandwich cell from FTO. Gels were formed in the cells by mixing a solution of NDI with GdL and loading the mixture into the cell. The time taken for a gel to form far exceeds the time taken to load the mixture into the cell, meaning uniform gels could be formed in situ.

Irradiation of the cells with a 365 nm LED resulted in both solutions and gels turning a black color (Fig. 2d). Leaving the cell in sunlight resulted in the gels and solution changing to a light brown color over several hours (Supplementary Figure 12). By comparison, forming the radical anion electrochemically resulted in a very quick change from transparent to black (less than 2 s for both the solution and the gel). This compares well with other systems10, 13. The reverse transition from black to transparent was slower, but still achieved in under 1 minute (Supplementary Figure 10). The black-to-transparent transition could also be achieved by oxidation using a positive voltage (Supplementary Figures 10 and 11). This cycling between transparent to black could be carried out reversibly, for at least 100 cycles, with very little change in the color as seen in the UV–Vis absorption spectra of either the dark or the transparent state (Supplementary Figures 13 and 14). Unfortunately, due to limitations in our set up we were unable to carry out more cycles as the system started to dry out.

Interestingly, the photogenerated black state could be reversed back to the transparent state by applying a positive voltage (Fig. 3). This leads to the possibility of using these materials in a multi-stimuli responsive device. This could again be reversed many times with no change in response time or intensity of color of either state.

Fig. 3
figure 3

Dual stimuli responsive behavior. a UV–Vis absorption data of 1 gel prepared in a cell irradiated with UV light (red data and b) and after applying 0.6 V for 60 s (black data and c). Scale bar is 1 cm

Whilst the generation of the radical anion and color change can be achieved in both the solution and gel states, there are advantages in using the gels as opposed to the solutions. When the electric current was interrupted such that a complete color change had not occurred, mixing by diffusion could be observed in the solution state. However, in the gel state, where 1 is assembled into essentially immobile fibers, this mixing is not observed (Fig. 4).

Fig. 4
figure 4

Patterned solutions and gels Patterned solutions (ad) are not as stable over time as the gels (eh) as shown by the loss of resolution on the patterned surface. a and e show the initial solution and gel, respectively. The photographs were taken at 0 min (a and e), after 1 min (b and f), 5 min (c and g) and 10 min (d and h) after applying a potential of 0.7 V. The scale bar represents 1 cm

This lack of diffusion allows patterning of the gels. This can either be done by photopatterning using a mask (positive patterning) or patterning the surface of the FTO glass (negative patterning). Photopatterning with a mask can lead to blurred edges of the pattern (Supplementary Figure 15), with gels giving more defined edges than solutions due to the lack of diffusion. With patterning of the FTO glass surface more defined patterns could be obtained. This was done by scratching the FTO surface to remove the conductive coating but could also be achieved when depositing the FTO. Again, the gels gave a more defined and stable shape (Figs. 4e–h) whereas the solutions gave defined patterns too, but they were not stable and were removed by diffusion and oxidation of the solution (Figs. 4a–d).

Temperature stability

For use in many situations, the temperature range of the gels is important. The gels formed in a mixture of water and glycerol are stable over at least a temperature range of −10 to 45 °C (Supplementary Figure 16). We also highlight that the color change can be obtained for dried solutions and gels. However, the dried films are not optically transparent. Further, the color changes are far slower in the dried films, meaning that the gels again have an advantage.


In conclusion, we have shown that NDI-based gels can be used as electrochromic materials, with a reversible, quick, and highly desirable transparent-to-black color change. The gels are stable over a useful temperature range, and utilize low concentrations of the NDI, as well as benign and cheap solvents. Since the voltage needed to generate the radical anion is less than 1 V, little power is needed to bring about these color changes. Our contention is that the combined light and electrochemical stimuli have advantages. When exposed to sunlight, the samples will darken in the absence of an applied current, meaning that a window would act to reduce the transmittance without the need for added energy. However, if desired, a low voltage would be sufficient to ensure a transparent window. As such, these gels offer an interesting and useful potential alternative method to current electrochromic materials for applications such as smart windows.


Gelator synthesis

1 was synthesized in the reaction between na'phthalene-1,4,5,8-tetracarboxylic acid dianhydride and glycine-phenylalanine in molten imidazole following standard protocols. The full experimental details and characterization are available in the Supplementary Methods. NMR spectra and full characterization of 1 can be found in Supplementary Figures 1722.

Formation of solutions and gels

Solutions were prepared at a concentration of 2.5 mg/mL of gelator. The gelator was dissolved in 2 molar equivalents of NaOH (aqueous), this was then made up to the desired volume using an 80/20 water/glycerol mixture. A background electrolyte of NaCl was used at a concentration of 0.1 M.

To prepare the gels, the solution as described above was added to 5 mg/mL of GdL in a vial. The solution was gently shaken until the GdL had dissolved and then transferred to the sample container, cuvette, mould, or device where it was allowed to gel. The samples were left overnight to gel. For rheology and photographs they were prepared in 7 mL Sterilin vials. Gels for UV–Vis absorption and SANS measurements were prepared in 2 mm pathlength quartz cuvettes. For the chromic windows, the solutions were injected into the FTO cells, as described below.

Small angle neutron scattering

SANS measurements were performed using the D33 instrument (Institut Laue Langevin, Grenoble, France)34. A neutron beam, with a divergence of Δλ/λ = 10.2%, allowed measurements over a Q-range range of 0.002–0.18 Å−1 using three instrument configurations; for low Q data, a wavelength of 13 Å with the detector at 12.5 m; for middle Q data, 6 Å with the detector at 12.5 m; for high Q data, 6 Å and a 2 m detector distance. The data were fitted using Sasview (Doucet, M. et al. SasView version 4.1.2. Zenodo. (2017)).

Cryogenic-transmission electron microscopy

Cryo-TEM imaging was performed using a FEI Tecnai 12 TWIN TEM, operating at 100 kV. The TEM grids were treated with plasma air to render the lacey carbon film hydrophilic. A thin film of the sample solution was produced using the Vitrobot with a controlled humidity chamber (FEI). After loading of the sample solution, the lacey carbon grid was blotted using pre-set parameters and plunged instantly into a liquid ethane reservoir precooled by liquid nitrogen. The vitrified samples were transferred to a cryo-holder using a cryo-transfer stage which was cooled by liquid nitrogen. The cryo-holder temperature was maintained below −170 °C during the imaging process to prevent sublimation of vitreous water. All images were recorded by a SIS Megaview III wide-angle CCD camera. Fiber width measurements were collected using ImageJ software. The average was generated from 70 measurements and the standard deviation used for the error. Histograms were generated using SigmaPlot software.

UV–Vis absorption

UV–Vis absorption spectra were collected using a Cary 60 UV–Vis spectrophotometer from Agilent Technologies. Solutions or gels were measured in a 2 mm pathlength quartz cuvette (Hellma Analytics). Spectra were collected from 380–1100 nm at a scan rate of 2 nm/s. For irradiated samples, the cuvettes were irradiated using a 365 nm 700 mA LED, giving around 70 mW intensity of light on the samples, which was measured using a photometer (Thor Labs). Samples were irradiated for 5 min before the spectra were collected. Samples were allowed to relax back to the original color before another spectrum was collected.


All rheological measurements were performed using an Anton Paar Physica 301 rheometer, fitted with a chiller to help with the cold temperature measurements. Temperature calibrations were performed between −30 and 80 °C before starting the temperature measurements to ensure the correct temperature was being recorded. All data was collected using a vane (ST10-4V-8.8/97.5) and cup geometry (H-24-D) so samples could be prepared in aluminum cups or Sterilin vials to remove any loading issues. There was a gap distance of 1.5 mm between the bottom of the gel and the cup. A zero force of 0 N was maintained throughout the experiments. Measurements were recorded in triplicate. All measurements were recorded in the linear viscoelastic region of the gels as determined by the strain sweeps, which are recorded first. G′ and G″ are determined from the frequency sweeps at 10 rad/s. The yield point is determined at the point at where G′ and G″ deviate from linearity in the strain sweep, and the flow point where G″ crosses over G′.

Strain sweeps were recorded from 0.1–1000% strain at 10 rad/s. They were recorded at 25 °C in triplicate. 2 mL gel samples were prepared in 7 mL Sterilin vials as previously described.

Frequency sweeps were recorded from 1–100 rad/s at a strain of 0.5%. They were recorded at 25 °C in triplicate. 2 mL gel samples were prepared in 7 mL Sterilin vials as previously described.

Temperature dependence measurements were performed as follows: G′ and G″ and were recorded over time at a frequency of 10 rad/s and a strain of 0.5%. The temperature was then lowered at a rate of 0.5 °C/min from 45 to −10 °C. To ensure the correct sample temperature a Eurotherm type K thermocouple was also used. Samples were measured in triplicate and prepared in aluminium cups as previously described.


Spectra were collected using the spectrophotometer used above and a LabOmak UF-spectroelectrochemical cell. The cell has a platinum working and counter electrode. A PalmsSens4 potentiostat (Alvatek Ltd.) was used to control the voltage of the cell. To reduce the sample a potential of +0.7 V was applied for 60 s and a spectrum recorded. To then oxidize the sample, a potential of +0.6 V was applied for 2 min and a spectrum recorded. This was then cycled over 30–50 times to gauge the reversibility of the process.

Fourier-transform infrared spectroscopy

Data was recorded using a Thermo Nicolet Is5 (Diamond ATR attachment). The spectra were recorded at 64 scans and a resolution of 4 cm−1. The background was of the empty ATR crystal and spectra were recorded of D2O, NDI in D2O and the NDI in D2O irradiated for 1 min at 365 nm. Spectra subtraction was done using OMNIC 8 software.

Cyclic voltammetry

CVs were collected using a PalmSens4 potentiostat with a glassy carbon working electrode, platinum counter electrode and an Ag/AgCl reference. Voltammograms were measured from 0 to −1.5 to +1 V at various scan rates from 0.02 to 0.8 V/s. Voltammetry could be also used on the FTO windows to change the color of the windows, with the reference and counter electrode on one end and the working electrode on the other. Alternatively, the potential could be set to −0.7 V for the dark color and + 0.6 V for the transparent color.


The windows used for the chromic displays were prepared from FTO glass (TEC 10 20 × 15 × 1.1 mm, from Ossila). The glass was sonicated in ethanol at 40 °C for 30 min prior to assembly and gloves were used throughout to prevent fingerprints on the glass. Two pieces of FTO glass were sandwiched together using a two-part epoxy resin and a 3D printed 1 mm thick spacer ensuring that the FTO layers were facing inside the cell. To be able to inject the gelator solution into the cell, two 0.8 mm diameter holes were drilled into one of the pieces of FTO glass. These could be sealed with glue or grease to prevent air getting into the cell. Pieces of copper tape were added to the edges of the cell to ensure good contact between the cell and the crocodile clips from the potentiostat. The working electrode was clipped to one end of the cell and the reference and counter electrodes to the other to make it a two-electrode experiment. The potential could be set to change the color of the cell.

Electron paramagnetic resonance

Data were recorded at X-band frequency on a Bruker ELEXSYS E500 spectrometer equipped with an ER 4102ST-O optical transmission resonator. Samples were transferred into soda glass capillary tubes with a diameter of 2 mm. Tubes were sealed at one end and samples filled 20 mm of the capillary tube. Samples were irradiated with a 365 nm LED from LedEngin with an IsoTech CD laboratory power supply at a constant current of 0.7 A for 2 min. Field-swept spectra represent 5 scan averages collected over a 5 mT sweep width centered at 344.8 mT, with modulation frequency = 100 kHz, modulation amplitude = 0.05 mT, receiver gain = 60 dB, time constant = 40.96 s, sampling time = 10.24 s, and microwave power = 6.3 mW. Simulations were performed using Bruker’s Xsophe software package35.