Introduction

Halochromic materials can have a crucial role as sensors for various purposes, in healthcare or fitness industries, or even serve as a sensor for acid rain (Van der Schueren and de Clerck 2012a, b; Van Der Schueren et al. 2012; Cao et al. 2018; Promphet et al. 2019; Stojkoski and Kert 2020). The most common challenges of application of pH-sensitive dyes to textile materials are the proper compatibility of dye-fiber system and the appropriate range of pH sensitivity for targeted application (Van der Schueren and de Clerck 2011; Sun et al. 2015; Pakolpakcil et al. 2018). Ideally, pH response of functional materials should be fast, stable, ensuring proper visible warning. In wound management, a dressing with pH sensor which will indicate infection/healing of wounds is highly sought after. The infection raises the pH of the wound to pH 8.9 for chronic wounds, or reaches pH 10 in infected second degree burns (Gethin 2007; Kumar and Honnegowda 2015; Ono et al. 2015). Contrary, a healing of the wound lowers pH (below 7) (Gethin 2007). In addition, wound dressing must be non-toxic and should not contribute to a worsening of a wound condition. Cellulose and chitosan (CS), as abundant, natural, biocompatible, and nontoxic biopolymers, emerge as leading materials for the healthcare and medical textile industry (Kalia and Averous 2011; Cédric 2017). The use of natural polymers in healthcare is important not just from the aspect of biocompatibility, biodegradability, and general health safety, but also from the aspects of the negative environment impact decrease from (over)usage of synthetic polymers. Furthermore, the use of natural, instead of synthetic dyes, especially for biopolymers dyeing (Bechtold et al. 2003), is added value toward the development of all-natural products.

Bacterial pigments, as a sustainable resource, gained much attention in previous years as textile colorants, due to their abundance and quality of the produced color (Hari et al. 1994; Charkoudian et al. 2010; Amal et al. 2011; Chandi and Gill 2011; Malik et al. 2012; Narsing Rao et al. 2017). Prodigiosins, bacterial secondary metabolites, have been extensively researched especially because of high yield production and capability for textile dyeing (Alihosseini et al. 2008; Siva et al. 2012; Stankovic et al. 2012, 2014; Chauhan et al. 2017; Gong et al. 2017; Ren et al. 2017, 2018). Prodigiosins have common structural motif, a 4-methoxy-α-α-bipyrrole moiety responsible for a deep red color. Prodigiosin is representative of the acyclic members of this family; metacycloprodigiosin and nonylprodigiosin are examples of the cyclic members (Stankovic et al. 2012).

In our previous investigation, for multifiber fabric dyeing, solution made from bacterial culture extract of Streptomyces sp., NP4 was used, and NMR analysis of the solution confirmed the presence of prodigiosin as the main constituent (Kramar et al. 2014). Dyeing optimization revealed that NP4 had affinity mainly towards synthetic fibers such as PA, PAN, and cellulose derivative triacetate, whereas cotton and viscose were only stained. It was observed that NP4 solution is pH sensitive, having red shades in acidic and blue in basic range. However, the once dyed fibers did not show pH responsiveness, i.e. did not exhibit color changes when exposed to a different pH. Since the deepest coloration was obtained on polyamide and polyacrylonitrile fibers, both having abundance of nitrogen-containing groups and carbonyl moieties, in this work the viscose functionalization using chitosan was performed to introduce positively charged amino groups and to make it susceptible to dyeing.

Experimental

Chemicals

Sodium-periodate (Acros Organic 99% p.a.), glacial acetic acid (ZorkaPharm Šabac), sodium acetate (Centrohem, Serbia), Orange II Sodium salt (CI Acid Orange 7, Carl Roth), chitosan (powder, low molecular weight, Sigma Aldrich), acetone (Sigma Aldrich, reagent grade, 99.5%), standard buffer solutions pH 4, pH 7 (Reagecon) and pH 10 (Hanna Instruments) were purchased and used as received.

Viscose (cellulose) fabric

Bleached, plain weave viscose (regenerated cellulose) fabric provided by IGR Agence, Slovenia was used as experimental material. The cellulose fabric structure was: surface mass- 80 g m−2, yarn fineness (warp/weft)—9.6/9.9 tex, warp/weft count—40/35 cm−1.

Preparation of material for dyeing

Oxidation

Viscose was oxidized according to the method described in literature (Nikolic et al. 2014). Samples were treated with 0.4% (w/v) NaIO4 in an acetic buffer (pH 4.0) with material to liquid ratio 1:50, w/v. The oxidation was performed in dark, in a shaker, at room temperature for 60 and 120 min. The samples obtained were marked CV60 and CV120. After designated time, to stop the oxidation, samples were washed thoroughly with ice-cold distilled water.

Dissolution and deposition of chitosan onto viscose

Chitosan was dissolved in 2% acetic acid making 1% solution of chitosan (i.e. 3 g in 300 ml of acetic acid). Dissolution procedure was as follows: chitosan was placed in half of needed acetic acid volume, stirred briefly and left to stand for 60 min at room temperature. After 60 min, the remaining necessary volume of the solvent was added and solution was heated to 60 °C and stirred at that temperature for another 60 min, until clear solution was obtained.

Viscose fabric was added to chitosan solution (1:50 material to liquid ratio) and was put in a shaker/water bath for 60 min at 60 °C. After designated time, samples were removed from chitosan solution, washed with 500 ml of cold distilled water, and dried in an oven at 60 °C for 30 min. The chitosan was deposited on untreated viscose, denoting sample marked CV/CS and onto oxidized viscose with different oxidation times, having sample marks CV60/CS and CV120/CS.

Production and preparation of NP4 biopigment

Spore suspension of NP4 isolates was prepared in glycerol (20%, v/v), maintained at -80 °C, and used for the inoculation of cultures for pigment production experiments (Kieser 2000). Spore suspension (20 µL) was firstly inoculated into 20 ml cultures (maltose 15 g L−1, tryptone soy powder 8 g L−1, yeast extract 4 g L−1, CaCO3 2 g L−1) and incubated at 30 °C for 48 h. This pre-culture was then used for the inoculation of 400 mL maltose soy medium (1%, v/v). Production medium (MSY) contained: maltose 30 g L−1, tryptone soy powder 8 g L−1, yeast extract 4 g L−1, CaCO3 2 g L−1, NaNO3 3 g L−1, MnSO4 × 7 H2O 0.6 g L−1, ZnSO4 0.005 g L−1, FeSO4 × 7H2O 0.3 g L−1 and CoCl2 × 7 H2O 5 mg L−1. Bacterial culture was grown in Erlenmeyer flasks (1:5 culture to volume ratio) containing coiled stainless steel spring for better aeration, and incubated at 30 °C on a rotary shaker (180 rpm) for 6 days. Bacterial mycelium was separated from the aqueous supernatant by centrifugation (5000 × g for 10 min at 4 °C; Sorvall RC-5B Super Speed Centrifuge; Du Pont Instruments, USA). Mycelium pellet was extracted with ethyl acetate acidified with HCl (3 mL g−1 of wet mycelia weight; pH 4) by vigorous mixing at room temperature (20 min). Ethyl acetate extract, containing pigment, was separated from the cell debris by centrifugation (5000 × g for 3 min at 25 °C; Sorvall RC-5B Super Speed Centrifuge; Du Pont Instruments, USA). The wavelength scan of the extract was done from 200 to 700 nm using UV–VIS Spectophotometer Ultrospec 3300pro (Amersham Biosciences). Ethyl acetate extract, was then dried with Na2SO4, filtered, dried under reduced pressure and weighted. This dried crude pigmented material was then utilized in dyeing procedures.

Dyeing procedure with NP4

NP4 was firstly dissolved in pure acetone to obtain stock solution of 10 g L−1. It was performed by measuring necessary amount of extract, adding acetone and vortex shortly for a complete dissolution. This stock solution was further diluted with distilled water to prepare dyebaths of a desired concentration. pH of a dyebath was adjusted to 5.5 before dyeing using 0.01 M NaOH. Dyeing procedure was as follows: dyebaths were put in a waterbath at 40 °C, heated to 65 °C during 25 min when fabric samples were put in a dyebath. Following the next 20 min, temperature was raised to 85 °C and dyeing continued for 60 min. After the dyeing, samples were washed first with warm (65 °C) then cold water and were placed to dry at room temperature.

Characterization methods

SEM/EDX analysis

Viscose surface morphology was investigated with scanning electron microscopy (SEM) using a JEOL 840A instrument. The samples were coated with gold using a JFC 1100 ion sputterer. The elemental composition was analyzed by an INCA-PentaFETx3 energy dispersive X-ray (EDX) microanalyzer.

UV–VIS measurements

The absorbance of the dyebaths and NP4 solutions at different pH values were recorded with a UV–VIS spectrophotometer Shimadzu 1800.

ATR-FTIR measurements

Fourier transform infrared spectroscopy (FT-IR) was employed to analyze the fibers’ surface chemistry using Nicolet iS 10 FT-IR (Thermo Fisher 2 SCIENTIFIC) spectrometer with Smart iTR™ Attenuated Total Reflectance (ATR) Sampling accessory. The spectra were recorded in the range of 4000–600 cm−1 with 32 scans per spectrum.

Aldehyde group content

The aldehyde groups in samples were selectively converted to carboxyl groups using NaClO2 and the carboxyl group content was determined volumetrically. The aldehyde group content was calculated by subtracting the carboxyl content determined in the sample before oxidation with chlorite from that of chlorite oxidized sample (Nikolic et al. 2017).

CI acid orange 7 test for amino groups of chitosan

CI Acid Orange 7 test was performed according to the procedure described in literature (Fras Zemljič et al. 2009; Strnad et al. 2010; Sauperl et al. 2014).

Colorimetric measurement

In order to determine the color coordinates and reflectance of fabrics, colorimetric measurements (under illuminant D65 using the 10º standard observer) were performed using SpectraflashSF350X (Datacolor, USA). K/S values were derived from reflectance values at particular wavelength. Color difference ΔE* was measured and calculated from the difference between color coordinates (Sharma 2003) of samples exposed to different pH of the solution. As a standard, dyed fabric exposed to pH 7 was used, while ΔE* was calculated for batch samples exposed to pH 4 and pH 10.

Cytotoxicity assay

Cytotoxicity of the viscose samples were measured using the methods described previously (Hansen et al. 1989). The cytotoxicity of viscose samples was evaluated by testing the human keratinocyte cells (HaCaT cell line obtained from ATCC) and the human fibroblasts (MRC5 cell line obtained from ATCC). A material extract was prepared by immersing the threads in RPMI medium (10 mg mL−1) and incubated at 37 °C for 72 h. The samples were shaken at 180 rpm. Suspensions were briefly centrifuged 10 min at 5000 rpm (Eppendorf Centrifuge 5804R) and the supernatants were used in different concentrations. The cells were plated in a 96-well flat-bottom plate at a concentration of 1 × 104 cells per well grown in humidified atmosphere of 95% air and 5% CO2 at 37 °C and maintained as monolayer cultures in RPMI-1640 medium supplemented with 100 µg mL−1 streptomycin, 100 U mL−1 penicillin, and 10% (v/v) fetal bovine serum (FBS). After 24 h of cells incubation, the media containing increasing concentrations of material extracts: 12.5%, 25%, 50% and 100% (v/v) were added to the cells. Control cultures contained 200 µL of growth medium. After 48 h of incubation, cells cytotoxicity was determined using 3-(4,5-dimethylthiazol-2-yl)-2,5-diphenyltetrazoliumbromide (MTT) reduction assay. The extent of MTT reduction to formazan within cells was measured by absorbance at 540 nm on Tekan Infinite 200 Pro multiplate reader (Tecan Group Ltd., Männedorf, Switzerland). The MTT assay was performed two times in four replicates and the results were presented as percentage of the control (untreated cells) that was arbitrarily set to 100%. Results are presented as means ± SD.

Results and discussion

Characterization of viscose with deposited chitosan

Viscose, as cellulose fiber, was firstly converted to dialdehyde cellulose using sodium periodate, in incremental oxidation time (60 and 120 min), to promote the binding of chitosan via formation of Schiff base between aldehyde groups of cellulose and amino groups of chitosan (Kim et al. 2017; Korica et al. 2019).

However, it must be underlined that this is one of mechanisms for binding of CS to cellulose, the other one being hydrogen bonding between OH groups of CS and cellulose. After oxidations, chitosan was also physically deposited onto fibers surface and SEM/EDX analysis confirmed the presence of CS on viscose fibers (Fig. 1). Surface EDX analysis detected the nitrogen in samples with CS (Table 1) and confirmed the deposition of chitosan onto viscose fibers.

Fig. 1
figure 1

SEM images of viscose (CV) fibers a Untreated, b Oxidized with chitosan (CV60/CS) c) higher magnification of CV60/CS fiber with deposited chitosan

Table 1 EDX analysis of differently oxidized viscose (CV) with deposited chitosan (CS); the values are mean from four EDX measurements on different surface areas of fibers

Due to the fact that EDX is semi-quantitative analytical technique (Scimeca et al. 2018), the measurement of free positively charged –NH3+ groups after deposition of CS onto non-oxidized and oxidized CV was performed with CI Acid Orange 7 dye test (Fras Zemljič et al. 2009; Strnad et al. 2010; Sauperl et al. 2014) and results are given in Table 2, along with the results of quantitative determination of aldehyde groups in fibers; at the same time, estimation of interaction between functionalized viscose and CI Acid Orange 7 was determined knowing that untreated one does not bind dye at all, as can be seen in Fig. S1.

Table 2 Quantity of aldehyde groups of cellulose and free amino groups of chitosan

There was no clear correlation between quantity of aldehyde groups and free amino groups available to bind CI Acid Orange 7 dye.

Dyeing of functionalized viscose with NP4

Dyeing with NP4 was performed with 0.5% o.w.f. (on the weight of fabric) in the dyeing system containing acetone and water (1:99), corresponding to 100 mg/L concentration. It should be pointed out that in the previous investigation (Kramar et al. 2014) dyeing was performed in methanol:water solution (50:50), and an increase in the UV–VIS absorbance after dyeing occurred, thus indicating that initially not all dye was dissolved until the temperature was elevated during dyeing. In this work, improved solubility of dye extract in the solvent system acetone:water was found. Comparative UV–VIS spectra in different solvent systems is given in Fig. S2.

The absorbance peak at 535 nm detected in UV–VIS corresponds to a previously reported prodigiosin (Kramar et al. 2014; Ren et al. 2018). After the dyeing, the absorbance and pH of residual solutions was measured (Fig. 2). The deposition of chitosan onto cellulose significantly increases exhaustion of the dyebath, even though there is no clear correlation between free –NH3+ groups in samples with CS (Table 2) and exhaustion of the dyebath. Furthermore, the oxidation itself leads to a better exhaustion (samples CV60 and CV120) which suggests that aldehyde groups in cellulose are involved in binding the NP4.

Fig. 2
figure 2

a The change of the absorbance in UV–VIS spectra of NP4 solution after dyeing of differently functionalized viscose fabric and photographs of samples after dyeing and drying; sample marks untreated viscose (CV); oxidized viscose during 60 and 120 min (CV60 and CV120, respectively); untreated and oxidized viscose with deposited chitosan (CV/CS, CV60/CS and CV120/CS, respectively) b Absorbance at 535 nm of solutions after dyeing of samples vs oxidation time for samples with and without deposited chitosan (CS); small figure represents pH of NP4 solution after dyeing of samples vs oxidation time with and without deposited chitosan (CS)

The pH of the dye solution was also measured before and after dyeing (Fig. 2b). From starting pH 5.5, after dyeing of untreated cellulose, an increase of value to pH 6.2 was measured. In samples oxidized before dyeing, a decrease of pH was measured following the trend that the longer time of cellulose oxidation induced a greater decrease of pH and the addition of chitosan decreased pH even further.

Color coordinates of dyed samples were measured using spectrophotometer under illuminant D65 and standard 10° observer in CIELab color space (Table 3).

Table 3 Color parameters of the functionalized viscose samples obtained from colorimetric measurements

Parameter L* corresponds to the lightness of material (in the range 100–0 white-black), a*corresponds to red-green axis (from positive to negative, respectively) and b*corresponds to yellow-blue axis (from positive to negative, respectively). K/S value denotes color strength, derived using Kubelka–Munk equation (Sharma 2003) from reflectance R at the 535 nm, interpolated from data obtained during reflectance measurements. The particular wavelength was chosen due to the fact that the absorbance of the dyeing solution has a maximum at 535 nm.

Oxidation of viscose prior dyeing provides higher K/S values and lower L* parameter, indicating stronger color and darker samples. Samples with chitosan provided darker (lower L*), redder (higher a*) and less blue color (lower b*).

Since there is a very similar exhaustion of the dye solution in samples CV60/CS and CV120/CS and similar color strength, and evaluating benefit from shorter oxidation time, all further analysis was performed on samples oxidized for 60 min.

Structural analysis of functionalized viscose dyed with NP4

ATR-FTIR analysis of viscose before (CV) and after addition of chitosan (CV/CS) and dyeing (CV/CS/NP4) in Fig. 3 shows the typical cellulose II peaks, vibration of the β-glycosidic ring or deformation at C1 in cellulose II at 890 cm−1, C–O stretching of cellulose II at 1035 cm−1, CH2 wagging vibration at 1316 cm−1 and C–H deformation in cellulose II at 1364 cm−1; a broad band at 1640 cm−1 originates from absorbed water, 1735 cm−1 from carbonyl signal (C=O), 2880 cm−1 represents C–H stretching in cellulose II and amorphous cellulose, and, a broad band in the region of 3000–3600 cm−1 originates from hydrogen-bonded OH groups in cellulose (Schwanninger et al. 2004; Široký et al. 2010; Kim et al. 2017; Korica et al. 2019).

Fig. 3
figure 3

ATR-FTIR of cellulose samples untreated (CV) and oxidized for 60 min (CV60) with and without chitosan (CS) and afterwards dyed with NP4

The addition of chitosan (CV/CS) causes the shift from 890 cm−1 to peak at 893 cm−1, which is known from literature as CS peak (Kim et al. 2017; Korica et al. 2019). The band at 989 cm−1 corresponds to C–O valence vibration at C6 atom (Schwanninger et al. 2004; Korica et al. 2019) and a shift to 993 cm−1 indicates that OH group on C6 atom is involved in interaction with chitosan during deposition, probably via hydrogen bonding. Additional specific peaks of chitosan have been reported in other publications, 1560 cm−1 (stretching vibration of amino groups), 1590 cm−1 (N–H bending vibration of amide II) and 1651–1654 cm−1 related to amide I (Kim et al. 2017; Yang et al. 2018).

However, in Fig. 3, some of these peaks are overlapped with band of absorbed water at 1640 cm−1. In CV/CS, the 2880 cm−1 (CH stretching in cellulose II) is also shifted towards higher wavenumber, 2890 cm−1, while intensity of the band in the region 3000–3600 cm−1 decreased and a shift occurred from 3270 cm−1 to 3330 cm−1 confirming the formation of intermolecular hydrogen bonds between CS and CV, as it was reported in other publications (Yang et al. 2018; Korica et al. 2019).

The peak corresponding to carbonyls (1735 cm−1) does not change after addition of CS, even though the Schiff base formation between dialdehyde cellulose and chitosan should occur as a mechanism of crosslinking (Strnad et al. 2010; Sauperl et al. 2015; Kim et al. 2017; Yang et al. 2018; Pratama et al. 2019). This probably means that in this work dominant mechanism of cellulose-chitosan interaction is physical deposition, the hydrogen bonding as seen in the region 3000–3600 cm−1, and probably in some part Schiff’s base formation, but this is overlapped with a broad band at 1640 cm−1.

Furthermore, quantitative estimation of the functional groups content (Table 2) shows that quantity of aldehydes per g of fiber is much higher than that of amino groups; therefore a significant change in this peak at ATR-FTIR spectra could not be expected. ATR-FTIR did confirm that, beside chitosan, aldehyde groups are involved in interaction with NP4. The dyeing with NP4 causes in all samples a decrease of the peak at 1735 cm−1. The absence of this peak indicates that interaction occurred between NP4, i.e. prodigiosin as the main constituent of crude extract NP4 (Kramar et al. 2014) and aldehyde groups.

It should be stressed that characteristic vibrations of the NP4 in ATR-FTIR of crude extract (Fig. 4) could not be observed in spectra of dyed viscose fibers (Fig. 3), since they are overlapped by the cellulose peaks.

Fig. 4
figure 4

a FTIR spectrum of NP4 pigment; b UV–VIS spectra of NP4 in acetone:water (1:99) solution at different pH values

ATR-FTIR spectrum of NP4 extract (Fig. 4) exhibits characteristic vibrations (in cm−1) confirming the presence of prodigiosin based constituents and is in accordance with literature: 3250 (N–H stretching), 2923 (asymmetric CH2 stretching), 2852 (symmetric CH2 stretching), 1613 (C=C stretching + CNH bending), 1413 (CH3 bending), 1239 (ring stretching and bending), 1152 (C–O stretching), 993 (ring stretching and bending) (Jehlička et al. 2016). The NP4 extract is deprotonated at pH 10, i.e. proton from free pyrrol ring is removed, thus causing the rearrangement of electron density within the molecule which is observed as the bathochromic shift of absorption bands in UV–VIS spectra followed by the change of solution color from pink to blue (Fig. 4).

Taking into account the molecular structure of prodigiosin (Fig. 5) one can note that the presence of N–H groups makes this molecule sensitive to pH-value.

Fig. 5
figure 5

Acid–base equilibrium of prodigiosin where R1 and R2 refer to alkyl groups

Generally, pKa value of prodigiosin (Rizzo et al. 1999; La et al. 2007) varies between 7.2 and 7.98 indicating that during the dyeing (pH 5.5) pigment adopts protonated form. Due to the pronounced propensity of the protonated prodigiosin to bind anions via hydrogen bonds with all three pyrrole NH sites (Davis 2010), it is justified to assume that NP4 forms hydrogen bonds with aldehyde groups of cellulose. Having in mind that fibers with chitosan also bear positively charged -NH3+ at pH 5.5, the possible mechanism of NP4 binding is depicted at Fig. 6.

Fig. 6
figure 6

Schematic representation of possible interaction between cellulose, chitosan and prodigiosin

The orientation of the molecule is driven by the demand to minimize energy of the repulsion between two positive charges. In such way, two NH groups could be involved in the interaction with two individual aldehyde groups, or can form bifurcated hydrogen bond with one aldehyde group, while the third terminal pyrrole bearing alkyl side chains remains free. Accordingly, the binding of NP4 to the oxidized cellulose (without CS) also proceeds via O·····N–H hydrogen bonds. In this case, since no repulsion occurs, all three NH groups can form hydrogen bonds thus lowering the availability of aldehyde groups for interaction with other dye molecules, i.e. the number of possibly bounded dye molecules per aldehyde group is lower with regard to the samples with CS. Also, in this case, the steric hindrance of alkyl side chains on the surface of the fiber also affects the lowering of the exhaustion of dyebath. Suggested mechanism is also supported by the fact that NP4 shows affinity towards fibers bearing carbonyl groups (polyamide, triacetate) (Kramar et al. 2014).

The approach proposed in this work, for making cellulose susceptible to dyeing with prodigiosin, is somewhat different to commercial cationization used for cotton fibers, which aims to introduce positive charge on cellulose thus enabling the binding of direct and reactive dyes. Various cationic agents can be used for modification of cellulose, such are polyamide-based epichloro hydrin type of polymers, quaternary ammonium compounds, even bipolymers, chitosan, starch and their derivatives (Arivithamani and Dev 2017). Lim and Hudson (2004) proposed a use of chitosan derivative containing quaternary ammonium groups, O-acrylamidomethyl-N-[(2-hydroxy-3-trimethylammonium)propyl]chitosan chloride (NMA-HTCC), prior dyeing of cotton with reactive and direct dyes. The authors have stated that higher color yield is a consequence of formation of ionic bonds between NMA-HTCC and anionic dye (Lim and Hudson 2004).

While primary goal of conventional cationization is to promote ionic interaction between anionic dyes and cationic surface of cellulose fibers, in work presented here, introduction of positively charged groups on cellulose surface, as by proposed mechanism in Fig. 6., has a different role, i.e. repulsive interaction which, in fact, enables halochromic effect on material. The dominant mechanism of binding prodigiosin to cellulose is through hydrogen bonding to carbonyl group, which was introduced by oxidation.

Halochromic effect of dyed viscose

pH sensitivity was measured in the region pH 4–10, by measuring color coordinates and reflectance after the samples have been exposed to a buffer solution of pH 4, 7 and 10 (Fig. 7). The samples were tested for 10 color changing cycles. The change of color is evident both visually and spectrophotometrically and the change from blue to red/pink occurs fast (1–2 s), while the change from red to blue lasts longer (10–15 s). The reflectance curves of samples exposed to pH 10 indicate the shift of minimum towards a higher wavelength (580 nm). After exposure to neutral and acidic pH, curves have the same minimum (535 nm), but different reflectance, meaning that the color intensity is changing. In samples with CS, a difference in reflectance between samples exposed to all three values of pH was found, unlike sample CV60 whose reflectance curves measured at pH 4 and pH 7 are almost overlapping (Fig. 7). This suggest that for a cellulose to be used in all measuring ranges presented here (pH 4-7-10) chitosan deposition is crucial.

Fig. 7
figure 7

Reflectance (%) of differently functionalized fabrics exposed to different pH solutions

The oxidation and addition of CS lead to a higher red and less negative blue color coordinate when samples are exposed to pH 4 and pH 7 (Fig. 8). Alkali pH leads to a strong decrease of red and an increase of blue (Fig. 8a).

Fig. 8
figure 8

a Change of color coordinates a* and b* with pH for dyed oxidized viscose (CV60/NP4), viscose with chitosan (CV/CS/NP4) and oxidized viscose with chitosan (CV60/CS/NP4); b Color difference of samples after exposure to pH 4 and pH 10 compared with color of the sample exposed to pH 7; c Photographs of dyed samples after exposure to different pH; d ATR-FTIR spectra of dyed cellulose with deposited chitosan exposed to different pH

To examine distinctive colors at different pH, the color difference ΔE* was calculated for textile samples exposed to pH 10 or pH 4 and compared with sample exposed to pH 7 (Fig. 8b).

Samples with chitosan (CV/CS and CV60/CS) show an almost equal color difference between ones exposed to pH 4 compared with samples exposed to pH 7 and similarly, samples exposed to pH 10 compared to the ones exposed to pH 7, with the higher ΔE* in sample CV/CS. In sample CV60 there is a noticeable color difference towards pH 10, but towards acidic, ΔE* is slightly above 2, which is, according to literature (Sharma 2003) defined as “just noticeable difference” and this visually can be seen in Fig. 8c.

The color of samples with CS exposed to various pH could be the consequence of binding mechanism. Proposed mechanism (Fig. 6) suggests that the dye molecule, i.e. its pyrrolyl pyrromethene chromophore is not all immobilized by bonds with cellulose and chitosan, and can respond to pH changes. Furthermore, the new shoulder was detected at 1590 cm−1 in ATR-FTIR after samples’ exposure to pH 10 (Fig. 8d).

This peak is ascribed to chitosan, specifically to NH2 groups arising from the deprotonated –NH3+, as reported in other works (Zhang et al. 2019), again confirming that ammonium groups do not directly participate in the binding of the NP4, i.e. prodigiosin, rather on its conformation when bonded to fibers surface, as suggests proposed mechanism on scheme in Fig. 6. Reversible pH-mediated color change of the fibers is also related to the structural changes of the dye solution at different pH values caused by protonation/deprotonation of the NP4 molecule (Fig. 5). This allows us to conclude that halochromic properties of the investigated fibers are influenced by the specific behavior of the NP4 at different pH values and specific bonding to functionalized cellulose with chitosan.

Cytotoxicity of dyed viscose

Cytotoxicity was evaluated by in vivo test using a human keratinocytes cell line (HaCaT) and human fibroblasts cell line (MRC5). According to this method, materials extracts were prepared by immersing the viscose samples (10 mg mL−1) in RPMI medium at 37 °C for 72 h under dynamic conditions. The cell viability exposed to viscose extracts of different concentrations was assessed using a standard MTT assay.

Histogram in Fig. 9 demonstrates the percentage of exposed cell growth compared to non-exposed cells (control) after 48 h.

Fig. 9
figure 9

Cytotoxic effect of materials extracts on a Human fibroblast MRC-5 cell line and b Human keratinocyte HaCaT cell line, survival rate in comparison to non-treated control that was set to 100% (average ± the SD); the results are expressed as the percent survival after 48 h of treatment and compared to the untreated control

The results presented in Fig. 9 indicate that materials extracts of 100% concentration can cause modest toxic effect to keratinocytes and fibroblasts. It was shown that 100% concentrations of NP4-dyed but untreated viscose extract did not induce significant decrease in HaCaT and MRC5 cells viability after 48 h-treatments.

Viscose with NP4 extract caused 30% decrease, whereas oxidized viscose and viscose with chitosan and NP4 caused approximately 40 and 50% decrease in MRC5 and HaCaT cells proliferation, respectively. Results also pointed out that over 80% of cells survived after being in contact with viscose materials extracts that were diluted by 50%. According to literature, materials are considered safe when the cells viability is over 70% (Andreani et al. 2017).

In conclusion, no significant cytotoxic effect on healthy human fibroblast (MRC-5) and human keratinocytes (HaCaT) cell lines of viscose with chitosan and NP4 was detected in the indirect assay, confirming their non-toxic nature.

Conclusion

pH-sensitive cellulose textile was obtained by functionalization of viscose fibers with chitosan and biocolorant NP4. The untreated cellulose is not susceptible to dyeing with NP4, but oxidation and chitosan addition enabled the successful coloration and pH responsiveness of dyed textile in the acidic, neutral, and basic region, exhibiting a major color shift from red (pH 7) to pink (pH 4) and blue (pH 10). pH-responsiveness is visually very fast (blue to red 1–2 s, red to blue 10–15 s), durable (it can withstand 10 cycles), without significant weakening of either color intensity or responsiveness time throughout cycles. The non-toxic nature of material indicates its possible use as wound dressing pH indicator, ensuring the fast and visual wound monitoring, especially because condition of wounds strongly depends and correlates with pH of the local environment.