Each string on the guitar (or ukulele) is given a colour. The notes played on that string are printed in that same colour, throughout the books. Simple as that!
And to make life easier for those who teach and play both instruments, the colour scheme is the same for ukulele and guitar. Here are the four open strings of the ukulele printed in their “rainbow” colours:
Here are the same colours used for the corresponding top 4 strings of the guitar:
And here is the complete set of six open strings on the guitar (with 2 additional colours for the 5th and 6th strings: