Chemistry - Explanation for why nickel turns green in hydrochloric acid

Solution 1:

The question is really badly worded. For starters, let’s look at solutions of nickel(II):

Colour comparison of various nickel(II) solutions
Figure 1: Nickel(II) solutions. From left to right: $\ce{[Ni(NH3)6]^2+}$, $\ce{[Ni(en)3]^2+}$, $\ce{[NiCl4]^2-}$, $\ce{[Ni(H2O)6]^2+}$. Image taken from Wikipedia, where a full list of authors is available.

You can ignore the left two but the rightmost is a standard nickel(II) solution (could be $\ce{NiSO4}$) while the second from the right is a chlorido-complex—basically $\ce{NiCl2}$ but dissolved in hydrochloric acid. I wouldn’t call the chloride solution ‘yellow’, more like ‘yellowish-green’ but your mileage may vary. Next, let’s look at solids.

Nickel(II) chloride hexahydrateanhydrous Nickel(II) chloride
Figure 2: salts of nickel(II) chloride. Left or top: hexahydrate. Right or bottom: anhydrous. Images taken from Wikipedia (hexahydrate, anhydrous), where a full list of authors is available.

The picture on the right is dry, i.e. completely water-free nickel(II) chloride (anhydrous). On the left, the salt contains tightly bound water molecules which can be removed by further drying although the salt itself would be dry in everyday terms; this is the hexahydrate of nickel(II) chloride.

It might seem easy that the salt on the left gives a greenish solution while the salt on the right gives a yellowish one. Here’s the catch: they should both give a greenish solution, because there is no excess of chloride as was required in the solution in figure 1.

But what about the actual question? Well, dissolving nickel in hydrochloric acid means that there should in fact be excess chloride, meaning that yellow (or yellowish green) would be the correct answer.

tl;dr: That question is a perfect opportunity to complain if it was marked as ‘incorrect’.

Solution 2:

Anhydrous nickel chloride is yellow. However most simple divalent salts of nickel are green. This should be good enough for high school. The question is poorly worded because it is ambiguous (hopefully the textbook will improve it). If they discuss metal complexes it can be mentioned that $\ce{[Ni(H2O)6]^2+}$ is green in color.

Solution 3:

Jan already gave a great answer explaining the real chemistry behind this, which you and your daughter should absolutely read. This answer also makes the point that the question is poorly worded and could be contested on that basis—that is absolutely true, but unfortunately rather common in high school chemistry courses.

In high school chemistry, one of the things they're trying to drill into young minds is how reactions proceed and which products will form. That's what they're trying to test here: can the student draw a conclusion about which product(s) will form when given the reactants?

Here, the reactants are given as excess aqueous hydrochloric acid and free nickel. Formulaically, that is the following reaction:

$$\ce{HCl(aq) + Ni(s) \rightarrow ?}$$

The student is supposed to be able to figure out that this is a single replacement/substitution reaction, a characteristic reaction of acids with metals, in which the ionic compound nickel (II) chloride will form while hydrogen gas is liberated:

$$\ce{2HCl(aq) + Ni(s) \rightarrow NiCl2 + H2(g)}$$

Once you figure this out, the question is designed to give you all of the information you need to answer the question insofar as it tells you what the colors of two different nickel salts are:

Nickel sulfate, $\ce{NiSO4(aq)}$ is a green solution. Nickel chloride, $\ce{NiCl2(aq)},$ is a yellow solution.

Essentially, you're supposed to decide which of these two salt solutions will be formed by the described reaction. Since the described reaction will yield nickel chloride (not nickel sulfate), the question is expecting you to answer that the solution will be yellow in color.

The question does not expect you to know, be able to figure out, or go research what color the solution will actually be if you do the reaction in the laboratory. Overthinking it may cause you to arrive at a different answer than was expected, which will lead you to getting the question wrong. You can absolutely contest this, but at least now you understand what the question wanted you to say and how they expected you to arrive at that conclusion.