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.
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
valueof 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 —
presetholding a Tailwind class string,colorholding a CSS color,imageholding aurl(...)shorthand — with the seed carried alongside as a second, independent field. Three formats in onevalue, discriminated bytype, which forcedPhoneFrameto decide between aclassand astylefor 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.