Changing background color in the Scatter and Residual Plots

Use the colorBlender function from this great post to define a custom gradient that is white for low values and gradually progresses to darker values e.g.

The “Copy to clipboard” button will copy a pure function definition to the clipboard. Paste and set a symbol to its value.

colorFunction = 
 Blend[{{0.0491, 
     Directive[RGBColor[1., 0.9999694819562066, 0.9999847409781033], 
      Opacity[1]]}, {0.1298, 
     Directive[RGBColor[
      0.5867093919279774, 0.47226672770275424`, 0.7917906462195773], 
      Opacity[1]]}, {0.1767, 
     Directive[RGBColor[0.250728, 0.225386, 0.769152], 
      Opacity[1]]}, {0.2043, 
     Directive[RGBColor[0.24408, 0.361242, 0.816084], 
      Opacity[1]]}, {0.25, 
     Directive[RGBColor[0.266122, 0.486664, 0.802529], 
      Opacity[1]]}, {0.3125, 
     Directive[RGBColor[0.305919, 0.585575, 0.739666], 
      Opacity[1]]}, {0.375, 
     Directive[RGBColor[0.36048, 0.655759, 0.645692], 
      Opacity[1]]}, {0.4375, 
     Directive[RGBColor[0.429842, 0.701849, 0.540321], 
      Opacity[1]]}, {0.5, 
     Directive[RGBColor[0.513417, 0.72992, 0.440682], 
      Opacity[1]]}, {0.5625, 
     Directive[RGBColor[0.607651, 0.743718, 0.358588], 
      Opacity[1]]}, {0.625, 
     Directive[RGBColor[0.705038, 0.742591, 0.299167], 
      Opacity[1]]}, {0.6875, 
     Directive[RGBColor[0.794549, 0.721158, 0.260829], 
      Opacity[1]]}, {0.75, 
     Directive[RGBColor[0.863512, 0.670771, 0.236564], 
      Opacity[1]]}, {0.8125, 
     Directive[RGBColor[0.901014, 0.582826, 0.216542], 
      Opacity[1]]}, {0.875, 
     Directive[RGBColor[0.902853, 0.453964, 0.192014], 
      Opacity[1]]}, {0.9375, 
     Directive[RGBColor[0.878107, 0.293208, 0.160481], 
      Opacity[1]]}, {1., 
     Directive[RGBColor[0.857359, 0.131106, 0.132128], 
      Opacity[1]]}}, #] &

Use it in the plot

SmoothDensityHistogram[pairs, ColorFunction -> colorFunction, 
 PlotRange -> {{0, 12}, {0, 12}}, 
 Epilog -> {Point[pairs], Line[{{0, 0}, {25, 25}}]}, 
 MaxRecursion -> 3, ImageSize -> 400]