Changing colors per page through drupal interface
You will probably have to add a "Background Color" field to the content type with some selections that map to CSS class names.

Then, depending on where you want to add the background (e.g. on the body or on just the main content area), to add a preprocessor function in your theme to add the selected class as a variable that can be used by the twig template.

E.g. for just the main content area, you would use something like:


function bartik_preprocess_page(&amp;$variables) {
  $node = \Drupal::routeMatch()-&gt;getParameter('node');
  if ($node) {
    if (!$node-&gt;color-&gt;isEmpty()) {
      $variables['bg-class'] = $node-&gt;color-&gt;getValue();
    }
  }
}
 

Copy the page.html.twig file to your theme's templates directory and add the bg-class to the section you want that color.  E.g. class="{{ bg-color }}".