They don't "learn" how to change colors. Their skin matures and develops more chromataphores, which are cells that expand and contract to show different colors.
They are born with a certain color scheme ALREADY. All baby chameleons (veiled) are just green and brown at one point, but they will eventually either get more yellow, green, blue, brown, orange on them at some point.
Yellow, green, and teal veileds are fairly common, while orange and brown are not very common. Brown especially. Since it's considered a "Stress" color, it usually isn't considered a body color that is normal, but one person on here had a naturally brown chameleon (and I'm sure some others have too).
So don't worry. Your cham will grow up and develop colors.