Introduction

Solvatochromic dyes exhibit absorption bands in the visible region. In recent years, these dyes used as probes to measure of the polarity of the medium [1,2,3,4,5]. Their visible absorption spectra can be influenced by non-specific interactions such as ion–dipole, dipole–dipole, induced dipole-permanent dipole interactions or by specific interaction such as hydrogen bonding with solvents [8, 9]. Thus, solvents play an important role in physical and chemical processes and can determine change in the position, intensity, and shape of absorption bands upon varying the solvent polarity which tend to modify the energy difference between ground and excited state of the chromophore. Solvatochromism is effective tool to investigate the physical and chemical properties of molecules [6, 7]. Therefore, the quantitative measurement of these interactions are set by different scientists to understand the extent of contribution of these interactions towards the solvation phenomena [9, 10].

The acidity constants (pKa) is an important parameter that indicates the degree of ionization of molecules in solution at different pH values. Many chemical, physical and biological properties of natural and synthetic compounds are governed by the basic and acidic properties. Thus, the pKa parameter is a significant interest in biology, pharmaceutics, medicine and many scientific fields [11, 12]. There are various methods used to estimate the pKa of compounds including the potentiometric technique, conductivity technique and spectrophotometric technique [13,14,15]. Moreover, the examination of organic solvents on the acidity constants play very important role in the acid–base equilibria and controlled in the pKa values related to different properties of solvents [16,17,18].

Methylene blue (MB), is an organic thiazine cationic dye and is defined as [Methylthioninum chloride, basic blue 9, tetramethyl thionine chloride]. Methylene blue is used as redox indicator in analytical chemistry [19, 20]. It has numerous application in industrial and in medical that including textiles, wood and papers [20, 21] as well as used to treatment of anemia and covid-19 [22].

This work reveals, the study influence of non-specific and specific solute–solvent interactions on the visible absorption spectrum of Methylene blue in various neat solvents at room temperature was investigated. Solvents were selected to show a wide variety of solvent parameters and hydrogen bonding capacity, to permit a good understanding of the solvent-induced spectral shifts. In addition, the visible absorption spectra of Methylene blue were measured in aqueous buffer solutions of different pH values at room temperature and used for computing the dissociation constants (pKa). Therefore, the effect of cosolvent on the acidity constants magnitudes was examined.

Experimental

Materials

Methylene blue 99.9% used in this work was purchased from Merck company as analytical reagent grad and used without further purification. The structure of Methylene blue is shown in Scheme. 1. The solvents used ethanol (EtOH) 96%, methanol (MeOH) 99.9% 1-propanol (PrOH) 99.9%, 99.8% 1,4-dioxane, 99% acetic acid(ACA), 99.9% dimethylsulfoxide (DMSO), 99.9% dimethylformamide(DMF),99% diethylether (DEtR), 99% ethylacetate (EtOAC) and 99% cyclohexanone (CHN) all spectroscopic grade and were used without further purification. These solvents have special polarity parameters mainly related to the refractive index (n) and relative permittivity (ε) of each solvent [10]. The physical parameters of the solvents at ~25 °C were reported in, Tables 1 and 2.

Scheme 1
scheme 1

Structure of Methylene blue (MB)

Table 1 The physical properties and parameters of solvents used in this work at room temperature 25 °C
Table 2 Electronic absorption spectra of MB in presence of 11 neat solvents (λmax, nm), molar absorptivity(ɛm, M−1.cm−1) and wavenumber(cm−1) at room temperature 25 °C

Preparation of the Solutions

A 25 mg quantity of Methylene blue was weighed separately and dissolved in some quantity of 96% ethanol before making up to 25 mL volumetric flask with the ethanol to give 3.13 × 10–3 mol.dm−3 stock solution of Methylene blue. In eleven 10 mL volumetric flask, 0.1 mL of stock solution was transferred to 10 mL volumetric flask and diluted up to the volume with diethyl ether, dioxane, ethyl acetate, cyclohexanone, DMF, DMSO, propanol, acetic acid, ethanol, methanol and deionized water to give the concentration 3.13 × 10–5 mol.dm−3. These solutions equilibrated and stored in the dark before spectra measurements at room temperature. The universal buffer in this study was prepared by mixing 0.04 mol.dm−3 of H3BO3, H3PO4 and glacial CH3OOH acids and including the desired volume of 0.2 mol.dm−3 NaOH (CO2free) to grant the specified pH. The ionic strength of the considered solution was balanced by including 0.5 mol.dm−3 solution of KCl. All solutions were prepared with de-ionized and CO2-free water. The working solutions with concentration 3.13 × 10–5 mol.dm−3in all buffered solutions.

Instrumentation

The visible absorption spectra were carried out on CECIL-CE 7400 (S.n.146368, England) UV–Visible Spectrophotometer model cell, covering the wavelength extend 400 -750 nm with a 1-cm path length quartz cell at room temperature 25 °C. All measurements were performed at 25 °C with solutions concentration are 3.13 × 10–5 mol.dm−3. The pH measurements were carried out using Precise pH-benchmeter Model PHS-3C accurate to ± 0.01 pH unit where the pH meter was standardized with standard buffer solutions (pH = 7 and 10) at ~25 °C. The distilled water was obtained by using Gambro distilled water (AK95 S, Sweden).

Results and Discussion

The Influence of Neat Solvent on the Electronic Absorption Spectra

In order to study of solvent effects on spectral features of Methylene blue. The absorption spectra of Methylene blue are measured in eleven distinctive solvents with different polarity at a concentration of 3.13 × 10− 5 mol.dm−3 in the range of 400–750 nm at room temperature ~25 °C. The solvents utilized in the work are chosen in arrange to represent of all sorts of solute–solvent interactions (non-electrostatic and electrostatic solvent effects), Table 1. The values of λmax of the MB in different solvents are summarized in Table 2. The visible absorption spectra of Methylene blue in selected solvents are shown in Fig. 1.

Fig. 1
figure 1

The electronic absorption spectrum of 3.13 × 10− 5 mol.dm−3 solution of MB in different solvents at room temperature ~25 °C

The visible absorption spectra of Methylene blue showed two absorption bands, Fig. 1. The first absorption band (λmax) in the range from λmax = 560 into λmax = 615 nm is assigned to a n-π* transition. The Methylene blue has two lone pairs of electrons of NMe2 and -S- groups. Hence, n-π* transitions are participated from these non-bonding orbitals to different π*orbitals. Therefore, the second band in range from λmax = 650 nm into λmax = 665 nm, is attributed to the partly forbidden transition (n-π*) with considerable charge transfer character (CT transition). The charge-transfer nature of this band is deduced from its broadness as from the sensitivity of its λmax to intermolecular hydrogen bonding interactions between solvent and the lone-pairs in molecule [18, 23].

Among the HBD solvents studies, the red shift band observed in HBD solvents (∆λmax = 10 nm) when passing from propanol (λmax = 655, εmax = 37.445 × 103 M−1.cm−1) into water (λmax = 665 nm, εmax = 37.380 × 103 M−1.cm−1)with increasing the relative permittivity and polarity of solvents. Since in protic media the n-electrons are involved in intermolecular hydrogen bonding and consequently their excitation is difficult due to their blocking by protic solvent molecules [24]. The shifting of the band occurred due to difference in the stabilization of ground and excited states and thus causes a change in energy gap between electronic states and causes the higher stabilization of the LUMO compared with the HOMO [10], this result in agreed with the reported by Moreira et al. [25]. Hence, the shape and intensity of the absorption spectra of MB depend on the solvent–solute interactions and solvent nature.

Among the HBA solvents, Fig. 1, the charge transfer band shifted toward the red (∆λ = 15 nm) on going from ethyl acetate (λmax = 650 nm) into cyclohexanone (λmax = 660 nm) into DMSO (λmax = 665 nm) which this shift agrees with increasing the polarity and hydrogen accepting ability; when proceeding from ethyl acetate (π* = 0.55) to cyclohexanone (π* = 0.76) to DMSO (π* = 1.00) which confirmed by the solute–solvent interactions from the type dipole–dipole and/or ion–dipole interactions [26]. Accordingly, one observes that the intense dim violet colour in ethyl acetate changes to green colour in CHN and to navy blue colour in DMSO.

As shown in Fig. 1, The absorption intensity of Methylene blue was found to be highest in polar protic solvents such as methanol (εmax = 60.767 × 103 M−1.cm−1) and ethanol (εmax = 59.361 × 103 M−1.cm−1) while lowest in polar aprotic solvents such as DMSO (εmax = 47.859 × 103 M−1.cm−1) and DMF (εmax = 51.054 × 103 M−1.cm−1) because the existence of solvent–solute interactions like non-electrostatic interactions [27]. The doublet structure in the absorption band of Methylene blue in neat solvents this suggest that the free cation degeneracy is dependent on the type of solvent. In a non-polar solvent such as dioxane, MB salt likely exists as ion pairs in solutions whereas the ions are solvated in polar solution such as methanol. In polar solvents the magnitude of the splitting between the overlapped absorption band of MB dependent on the solvatochromic properties of the media, this suggest that the existence of non-electrostatic interactions, which amino groups are play important role in the solvation of dye [18].

In general, it is seen from Table 2, the most bands of Methylene blue in HBD and HBA solvents that located in the spectral range from λmax = 650 into λmax = 665 nm, exhibits a lucid shift towards longer wavelengths in neat solvents in step with the sequence: EtOAC ≈ dioxane < MeOH ≈ EtOH < CHN < H2O ≈ DMSO. This shift doesn’t consider with the change in the polarity of the organic solvents and, therefore, it may be considered as a results of combination of several solvent characteristics like polarity, basicity, and H-bond-accepting ability.

The Analysis of Data in Neat Solvents by Multiple Linear Regressions

Several solvents parameters are used in multiple linear regression equations include one-, two- three and four-parameter using suitable combinations between the solvent polarity parameters E, K, J, H, M and N as reported before [28, 29]. The empirical solvent polarity, E is sensitive to both solvent–solute hydrogen bonding and dipolar interactions [28, 29]. The Kirkwood function, K is represents the dipolar dielectric interactions and is a measure of the polarity of the solvent that depends on the dielectric constant of the solvent, ε: [30]. The dispersion function J is measure of non-specific solute–solvent interactions [28, 29] and the dipolar effect function H is measure non-specific solute–solvent interactions and is related to the refractive index of the solvent, n: [28, 29]

$$\mathrm{E}=2.895\mathrm{x}{10}^{-3}{\upnu }_{\mathrm{max}} \quad \mathrm{K}= \frac{\upvarepsilon -1}{{2}\upvarepsilon \text{ + 2}} \quad \mathrm{ J}= \frac{\upvarepsilon - 1}{\upvarepsilon + 2}$$

The function M is representing the solute permanent dipole-solvent induced dipole [9, 31] and the function N is measure of the solute permanent dipole -solvent permanent dipole interactions: [9, 31]

$$H= \frac{{n}^{2} - 1}{{n}^{2}+2 } \quad M= \frac{{n}^{2} - 1}{{2n}^{2}+1 } \quad \mathrm{ N}=\mathrm{ J}-\mathrm{H}$$

The maximum wavelength of absorption band, Y in a given solvent has been expressed as a linear function of different solvent polarity parameters, xn as follows:

$$\mathrm{ Y }= {\mathrm{a}}_{0}+ {\mathrm{a}}_{1}{\mathrm{x}}_{1}+ {\mathrm{a}}_{2}{\mathrm{x}}_{2}+ {\mathrm{a}}_{3}{\mathrm{x}}_{3} + \cdot \cdot \cdot +{\mathrm{a}}_{\mathrm{n}}{x}_{n}$$
(1)

The Eq. (1) is able to solution for the intercept, ao and the coefficients, a1, a2, …, an by multiple regression technique. The regression intercept, ao has been considered as the peak position in the gas phase spectra [9, 28,29,30]. A program of statistical package of social sciences (SPSS) has been used to determine these coefficients by multiple regression technique [9, 28, 29]. A value of MCC near to unity and / or a small value (near zero) of the significance parameter (P) mean the correlation is good. Also, the higher value of F-number indicates the best fit model.

The spectral data are good evidence for the presence of solute–solvent interactions between the active solvents and amino groups with the prediction of the presence of some sort of H-bonding. The regression analysis data for Y2 bands (Y2: λmax ~ 650 to 665 nm) of the investigated compound is given in Tables 3 and 4. On scrutiny the results from Tables 3 and 4 the data show strong dependence of the shift in λmax of MB on (solute permanent dipole-solvent induced dipole function, M) and (Kirkwood function, K) with MCC = 0.305, 0.711 as well as (dipolar function H) and (dispersion function J) with MCC = 0.360, 0.734. The strong fit of (M and H) functions indicating the refractive index of the solvent is the predominant parameter to explain the spectral shifts. In contrast, (the dipolar function, N) show moderate impact on the spectral shift with MCC = 0.679. Thus, the dipolar interactions are responsible to determining the spectral shifts in the medium because the inductive-dispersive forces are stronger than the orientation interactions. This indicates the atomic and electronic polarization are part of the intermolecular interaction. This result confirm the non-electrostatic interactions are responsible to solvatochromism of MB [31]. From Table 3 and Fig. 2, the parameters M or H when combined with another parameter in two-parameter equations or with two parameters in three-parameter equations give high positive values of MCC.

Table 3 Regression analysis for methylene blue using K, M, N and E parameters
Table 4 Regression analysis for Methylene blue using J, H, N and E parameters
Fig. 2
figure 2

The percentage contribution of solvatochromic parameters in LSERs for MB in various neat solvents in case combination of M or H with other parameters

In general, the four parameters regression equation gives the best fit to the observed spectral shifts. the value of MCC ~ 1.000 which reflects strong fit. This may indicate that non-electrostatic and electrostatic solute–solvent interactions provide a reasonable model for describing solvent induced spectral shifts.

In order to demonstrate the quality of the multilinear regression analysis between four parameters (K, M, N and E) and (J, H, N, and E) techniques. The linear correlations between calculated and experimental λ (MB) values are attempted. The linearity of the curves is directly correlated to the multilinear regression quality (see the R2 values from Fig. 3 and Tables 3 and 4). The higher values of R2 indicate better fitting of the technique to the experimental data. Also, the “F” number is used to compare between two techniques describing the same experimental data. The results indicate that the linear regression of four parameters (J, H, N, and E) gave higher F-number value (7.28) represents a better determination of non-electrostatic interactions than that the linear regression of four parameters (K, M, N, and E).

Fig. 3
figure 3

Linear correlations between experimental and calculated λmax(MB) values (in nm) using LSERs for methylene blue in various neat solvents by using Eq. (1) with a K, M, N and E parameters and b J, H, N and E parameters

Solvent Induced Spectral Data Analysis by Two-Parameter Equation

The solvent induced spectral data were further treated using a two-parameter equation as follows: [32]

$${\nu }_{(solution)}={\nu }_{(vapour)}+ {K}_{1} \frac{2\upvarepsilon - 2 }{2\upvarepsilon + 2}+ {\mathrm{K}}_{2} \frac{2{n}^{2} -2}{{2n}^{2}+1 }$$
(2)

where vsolution is the frequency of the peak maximum in the presence of solvent, ɛ is the solvent dielectric constant, n is the solvent refractive index and vvapour is the frequency of the peak maximum in the absence of solvent. Multiple regression technique was used to evaluate vvapour, K1, K2 and the correlation coefficients.

From the analysis of data according to the Eq. (2), Table 5, it observed that the K1 and K2 values are negative for MB. This indicates that strong solutesolvent interaction is taking place, and causing decrease in energy of electronic transition from LUMO to HOMO compared with the vapor state, those results agreed with the results reported in ref. [33]. On the other hand, the parameter K2 is considerably higher than the parameter K1, Fig. 4, this interpreted as the non-electrostatic interaction are participated to bathochromic spectral shift of Methylene blue. The correlation data between (ʋ, n) is poor with value (r = 0.169), in contrast the correlation data between (ʋ, ɛ) with value (r = 0.677).

Table 5 Correlation coefficients obtained from multiparametric analysis through the treatment of ʋ (max) values with solvent parameters
Fig. 4
figure 4

The percentage contribution of solvatochromic parameters in LSERs for MB in various neat solvents

Kamlet-Taft and Catalan Polarity Scales

To understand the behavior of a solute–solvent interaction involved in solvent process. The effects of the electrostatic and non-electrostatic interactions on the electronic absorption spectra are interpreted using the linear solvation energy relationship(LSER) model. In recent decades, Kamlet-Taft (Eq. 3) [34] and Catalan Equation’s (Eq. 4) [35], have been applied to separate the influence of non-electrostatic interactions from electrostatic interactions. Non-electrostatic solute–solvent interactions (hydrogen bonding) are expressed by the solvent acidity, α or SA, and the solvent basicity, β or SB which can be evaluated by multilinear regression analysis. The electrostatic interactions are expressed by Catalan’s SP and SdP parameters as well as by the π* parameter.

$${\upsilon }_{max}= {\upsilon }^{\mathrm{o}} +\mathrm{ a\alpha }+\mathrm{ b\beta }+\mathrm{ s\pi }*$$
(3)
$${\upsilon }_{\mathrm{max}}= {\upsilon }_{\mathrm{o}}+\mathrm{aSA}+\mathrm{bSB}+\mathrm{cSP}+\mathrm{dSdP}$$
(4)

where π*, β, and α indicates dipolarity/polarizability [36], hydrogen bond acceptor (HBA) basicity [37], and hydrogen bond donor (HBD) acidity [38], respectively. In Eq. (3), the acidity of solvents as (SA) [39], and basicity of solvents as (SB) [40]. In Eq. (4), The partition of nonspecific solvent effects, term π* in Eq. (3), into two terms: dipolarity and polarizability (SdP and SP) [35]. In both Kamlet-Taft and Catalan solvatochromic models, is the regression value of the solute property in the reference solvent. The remaining parameters (a, b, s c and d coefficients) are obtained by using multilinear regression analysis and estimate the relative contribution of solvent molecules in photophysical behavior of solute molecules.

To clarify the results in Table 5, one notices that the magnitudes of the correlation coefficients (in Catalan LSER) vary in the order: c > d > b > a. It emerges that the polarizability of solvent parameter (c coefficient) contributes the most to the ʋ(MB) value in Catalan relation. This indicate that the Methylene blue undergo bathochromic shift with increasing the polarizability of solvents. In contrast, the contribution of the dipolarity parameter (c coefficient) is significantly lower than the polarizability parameter. The both polarizability with dipolarity of solvents (c = 1.115, d = 0.434) for Catalan model are play a more decisive role in the spectral shift this result in an accordance with the result obtained by Kamlet-Taft relation, which the π term is more responsible to the spectral shift with value (s = 0.662), see Fig. 4. This is suggesting the stabilization of the molecule within the first excited state relative to that within the ground state with expanding solvent polarity, will lead to positive solvatochromism. In contrast, the hydrogen accepting ability for both models has small influence on the spectral shift in comparison with the polarizability and dipolarity of solvents. Therefore, the contribution of the HBD acidity parameter (a coefficient) is significantly lower than the HBA basicity parameter for both Catalan (0.072) and Kamlet-Taft (0.022) relations and can be neglected, Fig. 4. This suggests that the hydrogen bond accepting ability of the solvent have greater effects on the transition energy than its hydrogen bond donor ability, this is often, in good agreement with results reported by literature [18]. Consequently, the Methylene blue molecule undergo stabilization via hydrogen bonding with solvent molecules. Finally, Fig. 4 is representing the percentage contribution of solvatochromic parameters of KAT relation Eq. (3) and Catalan relation, Eq. (4). MB showed that solvent polarizability and solvent dipolarity are the most vital parameters which influence the absorption frequency shifts for both models.

From the analysis of absorption frequencies according to Kamlet-Taft Eq. (3) and Catalan Eq. (4), it is found that the positive sign of b coefficient for Catalan model, Table 5, indicates a hypsochromic shift with increasing solvent hydrogen-bond basicity [41]. This means stabilization of the ground state relative to the electronic excited state. Otherwise, the positive sign of b coefficient suggests the formation of solute–solvent hydrogen bonds for both electronic states, which stabilizes them in solvents with high hydrogen bond accepting abilities. The negative signs of (s, c and d) coefficients, indicates a bathochromic shift with increasing solvent dipolarity/polarizability for both models, which suggests stabilization of the electronic excited state relative to the ground state. this is agreed with the results reported in ref. [33]. Hence, the very small negative value of a coefficient for both models is attributed to Methylene blue undergoes slightly a bathochromic shift with increasing hydrogen ability of solvents.

In order to demonstrate the quality of the multilinear regression analysis between Catalan and Kamlet-Taft strategies. The linear correlations between calculated and experimental ʋ(MB) values are attempted. The linearity of the curves is directly correlated to the multilinear regression quality (see the R values from Fig. 5 and Table 5). The higher values of R indicate better fitting of the model to the experimental data. Also, the “F” number could be also used to compare between two models describing the same experimental data. The results in Table 5 indicates that the solvent Kamlet-Taft scale with higher F-number value (40.847) represents a better determination of non-electrostatic interactions than the Catalan scale.

Fig. 5
figure 5

Linear correlations between experimental and calculated ʋmax(MB) values (in cm−1) using LSERs for Methylene blue in various neat solvents by using Eqs. (3) and (4)

The Effect of Buffer Solutions on the Electronic Absorption Spectra of Methylene Blue

Methylene blue is dye with content 99%, which sky blue colored at pH 2–4 and changed to blue at pH 5–7 and it changed to navy blue in pH ≥ 8. The change from the navy blue to sky blue with decreasing the pH due to delocalization of π system. The proton dissociation scheme can be represented as below:

$${{H}_{2}In}^{+3}\overset{pKa1}{\leftrightarrow } {HIn}^{+2} \overset{pKa2}{\leftrightarrow } {In}^{+}$$

The visible absorption spectrum of Methylene blue is investigated at different pH’s solutions from Fig. 6, the band position stays the same position with no identical change in the intensity which pH-dependence due to the rearrangement of the molecule as results as the protonation. The visible electronic absorption spectra of 3.13 × 10–5 M solution of Methylene blue in 50% (v/v) dioxane-water solution in the pH range 2–12 as for example, show in Fig. 6, exhibited two well-defined bands, the first band centered at 615 nm is assigned to n-π* transitions from amino groups. Therefore, the second band centered at 665 nm is assigned to n-π* with as possible formation of CT nature through the conjugation between the aromatic rings systems via the N and S atoms link). For acidic solutions (pH ≤ 4), the first absorption bands are lowest in intensity with no change in position while the second band are highest in intensity with no change in position suggesting that the unstable form (H2In+3) is deprotonated giving the species (HIn+2), Scheme 2. However, for basic solutions (pH ≥ 5) with increasing the pHs which the first absorption bands remain at the identical position with no identical shift in intensity. Figure 6. as well as the same change is observed for the second bands. Finally, the absences of an isosbestic point indicate the presence of acid–base equilibria between more than two species.

Fig. 6
figure 6

The electronic absorption spectra of 3.13 × 10− 5 M solution of Methylene blue in dioxane at different pH's

Scheme 2
scheme 2

The dissociation mechanism of Methylene blue: (I) Methylene blue cation, (II) Quinoidal form, (III) Diprotonated form of quinoidal form, (IV) Mono protonated form of quinoidal form

Herein, the protonation in MB may occur either in two NMe2 groups or at the central nitrogen atom of MB or both in tandem [42]. Figure 6, MB+ is also present that which a tautomeric and pH dependent equilibrium exists between Methylene blue cation (I) and its quinoidal form (II) [43], Scheme 2. Under protonation, the quinoidal form winds up in formed mono and dicationic forms by protonation on the nitrogen atoms (III and IV), Scheme 2. In solution, its colour ranges from sky blue in strong acidic solutions through blue in weakly acidic to neutral and navy blue in strong alkaline medium. The change in color with decreasing pHs is associated to the modification of the π system delocalization pattern [44]. The sample of distribution diagrams for Methylene blue species in several water-dioxane mixtures are shown in, Fig. 7. The variation of the species is due to the acid dissociation shifting as pH changes [9].

Fig. 7
figure 7

Distribution diagram of the acid species of Methylene blue in % 50 (v/v) water-dioxane at various pH’s

The Effect of Cosolvents on the Acidity Constants of Methylene Blue

The acidity constants of Methylene blue in this study are determined using three different spectrophotometric methods including the half- curve height, the modified limiting absorption and Colleter methods [47]. Table 6, in the half-curve height method: the pKa values were evaluated at a constant wavelength from the half height of the AS versus pH curves, Fig. 8, the pKa values are calculated from the half height of the curve where pKa = pH.

In the modified absorbance method: the pKa values are evaluated by applying the subsequent equation:

$$\mathrm{pH}=\mathrm{pKa}+\mathrm{log\gamma }+\mathrm{log}\frac{\mathrm{A}-{\mathrm{A}}_{\mathrm{min}}}{{\mathrm{A}}_{\mathrm{max}}-\mathrm{A}}$$

where Amax is the maximum absorbance, Amin is the minimum absorbance, A is the absorbance at any pH, and γ is the activity coefficient term. 0.5 M-KCl is added as a supporting electrolyte to control the activity coefficient term. By plotting the log absorbance ratio versus pH, when the log ratio term equals zero, pH equals pKa.

Table 6 Acidity constants of Methylene blue at λmax = 665 nm in numerous solutions of 50% cosolvents at room temperature ~25 °C,ionic strength 0.5 MKCl
Fig. 8
figure 8

The half-height method; Absorbance versus pH curve of MB at λmax = 665 nm in three different solutions

Finally, in the Colleter method: the pKa values were evaluated, where three different concentrations of hydrogen ions were selected and their absorbance values got, [H +]1 > [H +]2 > [H +]3 and As1 > As2 > As3. The acid dissociation constant is calculated:

$$\mathrm{K}= \frac{{{[\mathrm{H}}^{+}]}_{2}-\mathrm{M}{{[\mathrm{H}}^{+}]}_{3}}{\mathrm{M}-1}$$
$$\mathrm{M}= \frac{{\mathrm{As}}_{3 }{-\mathrm{ As}}_{1}}{{\mathrm{As}}_{2}-{\mathrm{As}}_{1}}* \frac{{{[\mathrm{H}}^{+}]}_{1}-{{{[\mathrm{H}}^{+}]}_{2}}^{ }}{{{[\mathrm{H}}^{+}]}_{1}-{{[\mathrm{H}}^{+}]}_{3}}$$

The calculated pKa values of Methylene blue in some aqueous solvents are listed in, Table 6. With change of cosolvent no shift occurs in wavelength but that is affected on the intensity of optical density. Calculations at λmax 665 nm using the three mentioned spectrophotometric methods reveal two pKa's. The pKa1 value is attributed to the dissociation of proton from NMe2 group the H2In+3 form. However, the other pKa2 value is attributed to the ionization of proton from central nitrogen in the HIn+2 form to formation neutral form, (HIn+2 ↔ In+). So, MB-IV is more stable compared to MB-III, which indicates the greater protonation tendency at the central nitrogen compared to the other two NMe2 [43]. Under extreme acidic conditions at pH < 2 occurs protonation for three amino groups and produced protonated lecuo Methylene blue H2LMB with colorless solutions [48]. Our calculations thank to Marvin Sketch 22.2 software give pKa values -0.21, -1.3 and 2.44, respectively, Fig. 9, The data and speciation diagram are present in SI. The experimental pKa values are different from the calculated pKa values this result suggest the Methylene blue molecules are dissociated in a cationic form for at higher pH values [49].

Fig. 9
figure 9

Calculated pKa values of MB (ChemSketch)

The pKa values of the Methylene blue are investigated in some media. It is clear from the data in, Table 6, that the pKa values of MB is largely dependent on the properties of the cosolvent. From Table 6, the acidity constant (pKa) is approximately in methanol more than the propanol although propanol have lowest relative permittivity (24.28, at ~25 °C) than methanol (33.7 at ~25 °C) this is not attributed to only relative permittivity control the magnitude of acidity constant as results as other parameters of solvents affecting on the acidity constants pKa [18]. Otherwise, the relative strength of hydrogen bonding as reflect the difference in pKa values [50]. Therefore, as compared despite dioxane have approximately the low relative permittivity constant (2.22 at ~25 °C), the Methylene blue more basic in (50%v/v) water + dioxane instead of all solutions as well as MB is solvated by different degree based on the type of solvents. In general, the pKa values of MB in water + organic solvent are arranged in line with the subsequent sequence: PrOH < MeOH < dioxane. This order not consider with decreasing the relative permittivity.

The effects of hydrogen bonding, solvent basicity, dispersive forces, and proton-solvent interactions play vital roles in the ionization process of acids in presence of organic solvents [17]. Thus, the observed increase in the pKa values of MB as result change of the organic cosolvent in the medium is increased due to the electrostatic effect in addition to the non-electrostatic interaction between the conjugated base (A) and solvent molecules. Since water molecules have the tendency to donate hydrogen-bonds than other solvent molecules [18]. It indicates also that the difference in the stabilization of the ionic forms by hydrogen-bond donor solvent molecules plays a very important role in an increase of the pKa values.

On scrutiny the results in, Table 6, reveals that the pKa values in the presence propanol are less than those obtained in the presence of corresponding amounts of the other solvents. This behavior interpreted by the high basic character of propanol (β = 0.85), which reflects itself in the construction of a powerful hydrogen-bond acceptor from the N+H(CH3)2 group of the non-ionized dye molecule and consequently promotes the ionization process to give low pKa [18].

Conclusions

Herein, the solvation characteristics of the Methylene blue molecules were investigated in neat solvents of various physical–chemical properties. The absorption spectral shifts were analyzed using multiple statistical regression model proposed by different techniques. Thus, correlations (MLR analysis) between the maximum of absorption band of Methylene blue and therefore the solvent parameters (K, M, N, J, H and ET(30)), (π*, α and β) or (SA, SB, SP and SdP). It shown that the electronic absorption spectra were mainly affected by non-specific interaction as well as specific solute–solvent interactions play role in solvatochromism of molecule. The results showed that the absorption maxima Methylene blue was dependent on the solvent polarizability/dipolarity and hydrogen bond accepting ability of solvents by Kamlet-Taft model.

The effect of buffer solutions on the absorption band of Methylene blue with different constituents were discussed and therefore the mechanism of ionization was explained. The acidity constants of the investigated compound were resolve by the methods described during this work. The results showed the dissociation constant of Methylene blue that dependent on the relative permittivity of the medium and hydrogen bonding formed between conjugate base and solvent molecule.