Okay, let's try to sort this out a bit - I was confused facing a couple of different issues:
NSRulerViews are showing inconsistent Backgrounds: With macOS 26 NSRulerViews are showing a very different layout, not only in contrast to prior macOS versions, but also inconsistent between horizontal and vertical rulers. I filed a corresponding bug report (FB20342342)
The horizontal ruler view is showing with a solid color. I assume the color is selected based on the first line of the inner view, because with a transparent content view the scrollview's background color is used, otherwise the content view's background color.
The vertical ruler view is using a much lighter or transparent version of the content view's background, what I would consider the intended (and expected) behavior.
NSRulerView is obscuring content in full screen: Custom apps are facing an incorrect behavior of NSRulerViews when running in full screen: The height of the horizontal ruler is increased, obscuring the top of the clipview. I observed this issue with one of my apps, but was able to replicate it with a minimal sample app, using a scrollable text view with rulers, refer to the attached screenshots. Again, I files a bug report (FB20342122)
Window mode:
Full Screen: