what accounts for the colour change from green to blue in the reaction below

[Ni(H2O)6]Cl2 + 6NH3 --> [Ni(NH3)6]Cl2 + 6H2O

its because of addition of ammonia and dehydrogenation occurs

Anjana may have meant dehydration and not dehydrogenation. Primarily it's because of the change from water as a complexing agent to ammonia as a complexing agent. Ammonia is a stronger field splitting agent (eg and t2g) then water and shows a larger energy difference between the two levels.

The color change from green to blue in the reaction is due to the formation of [Ni(NH3)6]Cl2 complex ion.

The reactant, [Ni(H2O)6]Cl2, contains a nickel (II) ion coordinated with six water molecules. This coordination compound appears green in color.

When 6 molecules of ammonia (NH3) are added to the reaction, they act as ligands and replace the water molecules in the coordination sphere of the nickel ion. The ammonia ligands form coordinate bonds with the nickel ion, resulting in the formation of [Ni(NH3)6]Cl2 complex ion.

The [Ni(NH3)6]Cl2 complex ion appears blue in color. This color change occurs because the energy levels of the d orbitals in the nickel ion are affected by the presence of different ligands. As a result, the complex absorbs a different range of light wavelengths, resulting in a different color appearance.

The color change in the reaction you provided, from green to blue, is due to the formation of a new complex compound called [Ni(NH3)6]Cl2.

To understand the color change, we need to consider the transition metal nickel (Ni) and its complex formation with ammonia (NH3). Transition metals, like nickel, have partially filled d orbitals that can interact with ligands, such as water (H2O) or ammonia (NH3).

In the reactant complex [Ni(H2O)6]Cl2, the water molecules act as ligands, surrounding the nickel ion (Ni) and forming coordination bonds. In this complex, nickel ion is in a high-spin state and absorbs certain wavelengths of light, resulting in the compound exhibiting a green color.

When ammonia (NH3) is added as a ligand to the solution, it replaces the water molecules coordinated with the nickel ion (Ni). The resulting product complex, [Ni(NH3)6]Cl2, has ammonia molecules as ligands, which form stronger coordination bonds compared to water molecules. This ligand exchange changes the electronic structure and energy levels of the nickel ion, causing it to absorb different wavelengths of light. This change in absorption spectrum leads to the observed color change from green to blue in the product complex.

In summary, the color change from green to blue in the reaction is due to the formation of a new complex compound, [Ni(NH3)6]Cl2, which has a different ligand arrangement and electronic structure compared to the reactant complex [Ni(H2O)6]Cl2. This change affects the way the complex absorbs and reflects different wavelengths of light, resulting in the observed color change.