You can accomplish this by adding colored shapes in your header and footer. It’s easier if you first enter the header information you want.
Now click on Insert Shapes and draw a rectangle from one corner of your header to the other.
You can use the Shape Fill section to select the color you want and the Shape Outline section to remove the border around the rectangle.
Now click on the Wrap Text option and select Through. Your header text will appear through the shape..
Perform the same steps in your footer and you’re all set.