Search code examples
macoscocoauser-interfacesystemcolors

Accessing the system's linen pattern?


Does Lion or Mountain Lion provide systemwide access to that dark linen pattern you see everywhere these days? I need to use it in my application and would really prefer something official to my own solution.


Solution

  • 10.8 AppKit release notes:

    NSColor

    There's a new NSColor class method to return the lighter linen color that should be used for backgrounds of pages and revealed view areas:

    + (NSColor *)underPageBackgroundColor;

    If this isn't quite the right color (you said "dark", this says "lighter"), you may be able to tint it from there.