SDLTemplateColorScheme Class Reference

Section Contents

Overview

A color scheme for all display layout templates.

-initWithPrimaryRGBColor:secondaryRGBColor:backgroundRGBColor:

Convenience init

Objective-C

- (nonnull instancetype)
    initWithPrimaryRGBColor:(nonnull SDLRGBColor *)primaryColor
          secondaryRGBColor:(nonnull SDLRGBColor *)secondaryColor
         backgroundRGBColor:(nonnull SDLRGBColor *)backgroundColor;

Swift

init(primaryRGBColor primaryColor: SDLRGBColor, secondaryRGBColor secondaryColor: SDLRGBColor, backgroundRGBColor backgroundColor: SDLRGBColor)

Parameters

primaryColor

This must always be your primary brand color

secondaryColor

This may be an accent or complimentary color to your primary brand color

backgroundColor

he background color to be used on the template

Return Value

An SDLTemplateColorScheme

-initWithPrimaryColor:secondaryColor:backgroundColor:

Convenience init

Objective-C

- (nonnull instancetype)initWithPrimaryColor:(nonnull UIColor *)primaryColor
                              secondaryColor:(nonnull UIColor *)secondaryColor
                             backgroundColor:(nonnull UIColor *)backgroundColor;

Swift

init(primaryColor: UIColor, secondaryColor: UIColor, backgroundColor: UIColor)

Parameters

primaryColor

This must always be your primary brand color

secondaryColor

This may be an accent or complimentary color to your primary brand color

backgroundColor

he background color to be used on the template

Return Value

An SDLTemplateColorScheme

primaryColor

The “primary” color. This must always be your primary brand color. If the OEM only uses one color, this will be the color. It is recommended to the OEMs that the primaryColor should change the mediaClockTimer bar and the highlight color of soft buttons.

Objective-C

@property (nonatomic, strong, nullable) SDLRGBColor *primaryColor;

Swift

var primaryColor: SDLRGBColor? { get set }

secondaryColor

The “secondary” color. This may be an accent or complimentary color to your primary brand color. If the OEM uses this color, they must also use the primary color. It is recommended to the OEMs that the secondaryColor should change the background color of buttons, such as soft buttons.

Objective-C

@property (nonatomic, strong, nullable) SDLRGBColor *secondaryColor;

Swift

var secondaryColor: SDLRGBColor? { get set }

backgroundColor

The background color to be used on the template. If the OEM does not support this parameter, assume on “dayColorScheme” that this will be a light color, and on “nightColorScheme” a dark color. You should do the same for your custom schemes.

Objective-C

@property (nonatomic, strong, nullable) SDLRGBColor *backgroundColor;

Swift

var backgroundColor: SDLRGBColor? { get set }