iOS Branding Colors

The BrandingColorsProvider mostly follows the Palette described at the top of the page. Capture uses the following subset of these colors:

Palette NameProperty name in BrandingColorsProviderUsage in Capture
primary, onPrimarysameBackground and text colors for a Primary action button, as well as detected document and crop shape color
secondary, onSecondarysameBackground and text colors for a Secondary action button
surface, onSurfacesameBackground and foreground colors for Tips screen
onSurfaceFocusfocusThe color of the image on Tips screen
captureBackground, onCaptureBackgroundsameBackground and foreground colors of the Camera, Preview and Crop screens

Other colors defined in BrandingColorsProvider and Palette are not used by Capture.

Example

In the following example the colors of Primary and Secondary action buttons are customized. All other colors are left with their default values

class MyColors: BrandingColorsProvider {
    
    var primary: Color { Color(red: 1.00, green: 0.80, blue: 0.00) }
    var onPrimary: Color { Color(red: 0.0, green: 0.0, blue: 0.0) }
    
    var secondary: Color { Color(red: 1.0, green: 0.0, blue: 0.0) }
    var onSecondary: Color { Color(red: 1.0, green: 1.0, blue: 0.0) }
}

let branding = Branding()
branding.colors = MyColors()
// ...