Hi,
one possibility is this:
- right-click the side margin and choose Go to master page “Standard” (or any other master page)
- then place a rectangle via Insert → Graphics → Rectangle
- then right-click into the rectangle and choose Position → Put Behind the Main Text
- right-click again, choose Graphic Properties… → Color… and choose your color
- deselect the rectangle by clicking outside the page
- right-click the page and choose Back to Main Text
If you assign different master pages to different page ranges, you can assign dedicated colors.
Hope it helps!