@gphone/sdk
    Preparing search index...

    Type Alias WallpaperState

    WallpaperState: { type: "color" } | { image: string; type: "image" }

    The home screen background.

    There are exactly two kinds, because there are exactly two things a background can be: a color, or a picture.

    A color needs no value of its own — it is the theme seed, and the gradient is generated from the scheme that seed produces. That is what makes a preset and a color dragged off the wheel the same thing: a preset is a picked color with a name.

    This used to be three kinds — preset holding a Tailwind class string, color holding a CSS color, image holding a url(...) shorthand — with the seed carried alongside as a second, independent field. Three formats in one value, discriminated by type, which forced PhoneFrame to decide between a class and a style for every render. And because the picture and the seed were chosen separately, they could disagree: the shipped "Dark Midnight" was a gray gradient with a blue seed.