PSPDFColorPalette


@interface PSPDFColorPalette : NSObject

A color palette is a set of color patches that are grouped together based on a specific look or theme.

  • Creates a color palette with a given title and the patches it should group.

    Declaration

    Objective-C

    + (nonnull instancetype)
    colorPaletteWithTitle:(nonnull NSString *)title
             colorPatches:(nonnull NSArray<PSPDFColorPatch *> *)patches;

    Swift

    convenience init(title: String, colorPatches patches: [PSPDFColorPatch])

    Parameters

    title

    The title of the palette.

    patches

    The color patches that should be grouped by this palette.

    Return Value

    A new color palette.

  • Creates a color palette representing all colors of the hsv color space.

    Declaration

    Objective-C

    + (nonnull instancetype)hsvColorPaletteWithTitle:(nonnull NSString *)title;

    Swift

    class func hsvColorPalette(withTitle title: String) -> Self

    Parameters

    title

    The title of the palette.

    Return Value

    A new color palette.

  • The title of the color palette as shown in the UI.

    Declaration

    Objective-C

    @property (readonly, copy, nonatomic) NSString *_Nonnull title;

    Swift

    var title: String { get }
  • The color patches this color space represents.

    Declaration

    Objective-C

    @property (readonly, copy, nonatomic)
        NSArray<PSPDFColorPatch *> *_Nonnull colorPatches;

    Swift

    var colorPatches: [PSPDFColorPatch] { get }
  • Declaration

    Objective-C

    + (nonnull PSPDFColorPalette *)monochromeColorPalette;

    Swift

    class func monochrome() -> PSPDFColorPalette

    Return Value

    A monochrome color palette containing 6 gray scale colors.

  • Declaration

    Objective-C

    + (nonnull PSPDFColorPalette *)monochromeTransparentPalette;

    Swift

    class func monochromeTransparent() -> PSPDFColorPalette

    Return Value

    A monochrome color palette containing 5 gray scale colors and a clear color.

  • Declaration

    Objective-C

    + (nonnull PSPDFColorPalette *)modernColorPalette;

    Swift

    class func modern() -> PSPDFColorPalette

    Return Value

    A modern color palette with 6 colors.

  • Declaration

    Objective-C

    + (nonnull PSPDFColorPalette *)vintageColorPalette;

    Swift

    class func vintage() -> PSPDFColorPalette

    Return Value

    A vintage color palette with 6 colors.

  • Declaration

    Objective-C

    + (nonnull PSPDFColorPalette *)rainbowColorPalette;

    Swift

    class func rainbow() -> PSPDFColorPalette

    Return Value

    A color palette with 6 colors similar to those in a rainbow.

  • Declaration

    Objective-C

    + (nonnull PSPDFColorPalette *)paperColorPalette;

    Swift

    class func paper() -> PSPDFColorPalette

    Return Value

    A color palette with colors suitable for page backgrounds.

  • Declaration

    Objective-C

    + (nonnull PSPDFColorPalette *)hsvColorPalette;

    Swift

    class func hsv() -> PSPDFColorPalette

    Return Value

    A color palette representing the hsv color space.