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

    Function useTheme

    • Read the phone's color theme.

      Everything in the SDK is themed from one seed color: an app never names a color, it names a role (bg-surface-container, text-on-surface-variant) and the role follows whatever the player picked. Read-only — an app that wants to change the seed (only Settings and Wallpaper have any business doing that) needs useThemeWrite too (MICA-127): declaring one is not declaring the other.

      schemeStore is the resolved token map, for the rare screen that needs a color as a value rather than as a class — a canvas fill, an inline SVG gradient. Reach for a utility class first; those are what the theme is actually delivered through.

      Returns {
          defaultTheme: ThemeState;
          isLightMode: Readable<boolean>;
          sanitizeSeed: (value: unknown) => string;
          schemeStore: Readable<M3Tokens>;
          seedFromRgbString: (value: string) => string | null;
          themeStore: Writable<ThemeState>;
      }

      • defaultTheme: ThemeState
      • isLightMode: Readable<boolean>
      • sanitizeSeed: (value: unknown) => string
      • schemeStore: Readable<M3Tokens>
      • seedFromRgbString: (value: string) => string | null

        Convert an rgb()/rgba() string — what a color picker emits — into a seed.

      • themeStore: Writable<ThemeState>