FUIBackgroundColorScheme

public enum FUIBackgroundColorScheme : String, CaseIterable
extension FUIBackgroundColorScheme: CustomDebugStringConvertible

Color scheme scenario, describing how the foreground color of the content should be configured to use appropriate color variants based on background color scheme. In Fiori UI design language, light color variants are mostly white, or a color with low alpha. Dark color variants are mostly black, charcoal, navy.

  • device: Use device interface style for background scheme. Foreground colors should be dynamically adjusted to natural variants (e.g. light or dark color variants) based on user interface style settings on iOS/macOS. This is the default setting for most content.
  • deviceInverse: Use inversed device interface style for background scheme. Foreground colors are inverted based on user interface style settings on iOS/macOS. If the device setting is in light user interface style, foreground colors will be adjusted to use dark color variants.
  • lightConstant: Use constant light background scheme. Foreground colors should constantly use light variants regardless of user interface style settings on iOS/macOS.
  • darkConstant: Use constant dark background scheme. Foreground colors should constantly use dark variants regardless of user interface style settings on iOS/macOS.
    • Use device interface style for background scheme, so foreground colors will be adjusted based on device background

    Declaration

    Swift

    case device
    • Use inversed device interface style for background scheme, so foreground colors will be adjusted as opposite to device background

    Declaration

    Swift

    case deviceInverse
    • Use constant light background scheme regardless of device settings, which means components will use dark variants of foreground colors

    Declaration

    Swift

    case lightConstant
    • Use constant dark background scheme regardless of device settings, which means components will use light variants of foreground colors

    Declaration

    Swift

    case darkConstant
    • Foreground color scheme that matches with light background color

    Declaration

    Swift

    @available(*, deprecated, renamed: "lightConstant")
    public static let light: FUIBackgroundColorScheme
    • Foreground color scheme that matches with dark background color

    Declaration

    Swift

    @available(*, deprecated, renamed: "darkConstant")
    public static let dark: FUIBackgroundColorScheme
  • Helper function to return an opposite color scheme of current value.

    Declaration

    Swift

    public func inverse() -> FUIBackgroundColorScheme

    Return Value

    inverse of current color scheme.