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 Name | Property name in BrandingColorsProvider | Usage in Capture |
---|---|---|
primary , onPrimary | same | Background and text colors for a Primary action button, as well as detected document and crop shape color |
secondary , onSecondary | same | Background and text colors for a Secondary action button |
surface , onSurface | same | Background and foreground colors for Tips screen |
onSurfaceFocus | focus | The color of the image on Tips screen |
captureBackground , onCaptureBackground | same | Background 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()
// ...