@mica/sdk (SDK contract v1)
    Preparing search index...

    Function useWallpaper

    • The phone's home screen background — read-only. Changing it is useWallpaperWrite (MICA-127): reading the current background and replacing the whole phone's are not the same ask.

      A background is a color or a picture, and a color is the theme seed — the gradient is generated from the scheme that seed produces, so a preset and a color dragged off a wheel travel the identical path. There is nothing to keep in sync because there is only one input.

      seedFromImage is how a photo becomes a theme: it quantizes the image and returns its dominant color, or null if it cannot (a non-data: source, a failed decode). null means keep the current seed, not "use black".

      Returns {
          activeSeed: Readable<string>;
          backgroundForSeed: (seed: string, mode: ThemeMode) => string;
          defaultWallpaper: WallpaperState;
          presets: readonly WallpaperPreset[];
          seedFromImage: (source: string) => Promise<string | null>;
          wallpaperBackground: Readable<string>;
          wallpaperNeedsContrast: Readable<boolean>;
          wallpaperStore: Writable<WallpaperState>;
      }

      • activeSeed: Readable<string>
      • backgroundForSeed: (seed: string, mode: ThemeMode) => string
      • defaultWallpaper: WallpaperState
      • presets: readonly WallpaperPreset[]
      • seedFromImage: (source: string) => Promise<string | null>
      • wallpaperBackground: Readable<string>
      • wallpaperNeedsContrast: Readable<boolean>

        Whether text drawn over the wallpaper needs the .text-on-wallpaper treatment.

      • wallpaperStore: Writable<WallpaperState>