WalletPasses.Theme (wallet_passes v0.4.3)

Copy Markdown View Source

Shared color/styling helper that produces platform-specific visual structs.

Only handles the common denominator (colors + logo text). Consumers merge in platform-specific assets (icon paths, image URIs) themselves.

Summary

Functions

Converts a hex color string (#RRGGBB) to Apple's rgb(r, g, b) format.

Produces an Apple.Visual from this theme's shared colors.

Produces a Google.Visual from this theme's shared colors.

Types

t()

@type t() :: %WalletPasses.Theme{
  background_color: String.t() | nil,
  foreground_color: String.t() | nil,
  label_color: String.t() | nil,
  logo_text: String.t() | nil,
  name: String.t() | nil
}

Functions

hex_to_apple_rgb(arg)

Converts a hex color string (#RRGGBB) to Apple's rgb(r, g, b) format.

to_apple_visual(theme)

Produces an Apple.Visual from this theme's shared colors.

to_google_visual(theme)

Produces a Google.Visual from this theme's shared colors.