Contents

PageColor

A directive that specifies an accent color for a given documentation page.

Declaration

@PageColor(_ color: Color)

Parameters

  • color:

    A context-dependent, standard color. (required)

    blue

    A context-dependent blue color.

    gray

    A context-dependent gray color.

    green

    A context-dependent green color.

    orange

    A context-dependent orange color.

    purple

    A context-dependent purple color.

    red

    A context-dependent red color.

    yellow

    A context-dependent yellow color.

Mentioned in

Overview

Use the PageColor directive to provide a hint to the renderer as to how the page should be accented with color. The renderer may use this color, depending on the context, as a foundation for other colors used on the page. For example, Swift-DocC-Render uses this color as the primary background color of a page’s introduction section and adjusts other elements in the introduction section to account for the new background.

This directive is only valid within a Metadata directive:

@Metadata {
    @PageColor(orange)
}

See Also

Customizing the Presentation of a Page