How could I express the idea that one person is learning the habits of other person?
Solution 1:
Consider rub off (on/onto somebody), which means:
(of personal qualities, behaviour, opinions, etc.) to become part of a person's character as a result of that person spending time with somebody who has those qualities, etc
I might say "Mr. Y is rubbing off on Mr. X" to mean that Mr. X is becoming like Mr. Y in general. Or I might refer to a specific positive or negative trait: "Your good manners have rubbed off on me."
Solution 2:
"picking up their habits"
Example usage:
I am picking up my sister's habit of listening to the Beatles.
My second child is picking up all the bad habits of my first child.
I'm picking up the habits of my roommate.
If you particularly want to use "colour," it would be something like this:
Steve is really colouring the behaviour of his partner.
...but it is not an idiom like "picking up habits..." and I would not recommend using that.
Incidentally: there is a somewhat humorous idiom "Well colour me happy!" which you may be thinking of, but it is not really related to habits and habit forming.