This can be done in the Clinical Administration program. We do have a handout in the Knowledge Base section which shows you how to create a new scheme which includes instructions on how to set the foreground and background colours for a scheme. Once you change the colours, this will be applied to all new and existing patients the next time that a user logs into R4+.
The hand out can be found here:
In Clinical admin you can click on Scheme Colours and change these there as well as adding new ones
Also from the main menu of R4 edit>settings>user and you will see Appointment book Colours
and you can select no colour , colour by scheme or appointment colour
Also if you go to the Planner
View > Appointment types or Session types where you can select different colours
The above should cover everything you may want to do.