This passage is a example of imagery. Look closely as he compares the beard to being yellow, and the tattered beard of the beggar. As you may guess the author is painting a description for you, making this imagery.(I guess you can also say comparing but I don't think that's it)