You can press F1
in htop to view the help manual, this will show you the color meanings as illustrated below:

CPU bar colors:
- Dark blue: Low priority tasks
- Green: Normal/user tasks
- Red: Kernel tasks
Memory bar colors:
- Green: Used memory
- Blue: Buffered memory
- Yellow: Cached memory