Locations of code related to book titles

First let me say that I’ve been playing the game for about two weeks straight and I absolutely love it. I feel like it was made for me.

Note: I’m playing experimental build version: 6def3c2

I’m planning on making a small contribution and was wondering if anybody knows where the code that manages the changing color of a books title is.
Book titles seem to changed color from blue to yellow based on their required intelligence, and required skill level to understand compared to your current intelligence and skill level. I’m looking for the location of the function(s) that handle that.

If somebody could point me in that direction I can save myself some time spent hunting!

Thanks guys!

Item info is defined in data/json/items/, books in particular are in that directory in books.json
The code that loads those files is in src/item_factory.cpp, specifically load_book()
The data structure for book definitions is in src/itype.h, it’s called it_book
Item names are generated in item.cpp in item::tname()
item descriptions are in a big hairball in item.cpp in item::info()
colors in particular are decided in item::color() <— I think this is what you’re looking for
Note book handling is in a bit of flux, this just landed: https://github.com/CleverRaven/Cataclysm-DDA/pull/7814