///|
/// Preset recipes provide stable, documented starting points for applications.
pub fn preset_poster(seed : UInt) -> DesignDocument {
make_design_document(seed, 1080.0, 1350.0, sunset_palette())
}
///|
pub fn preset_square(seed : UInt) -> DesignDocument {
make_design_document(seed, 1080.0, 1080.0, ocean_palette())
}
///|
pub fn preset_banner(seed : UInt) -> DesignDocument {
make_design_document(seed, 1600.0, 600.0, forest_palette())
}
///|
pub fn preset_packaging(seed : UInt) -> DesignDocument {
make_design_document(seed, 1200.0, 800.0, thermal_palette(6))
}
///|
pub fn preset_thumbnail(seed : UInt) -> DesignDocument {
make_design_document(seed, 512.0, 512.0, sunset_palette())
}
///|
pub fn preset_social_story(seed : UInt) -> DesignDocument {
make_design_document(seed, 1080.0, 1920.0, ocean_palette())
}
///|
pub fn preset_card(seed : UInt) -> DesignDocument {
make_design_document(seed, 750.0, 1050.0, forest_palette())
}
///|
pub fn preset_landscape(seed : UInt) -> DesignDocument {
make_design_document(seed, 1600.0, 900.0, ocean_palette())
}
///|
pub fn preset_square_small(seed : UInt) -> DesignDocument {
make_design_document(
seed,
256.0,
256.0,
triadic_palette(Color::rgb8(40, 90, 180)),
)
}
///|
pub fn preset_square_large(seed : UInt) -> DesignDocument {
make_design_document(
seed,
2048.0,
2048.0,
triadic_palette(Color::rgb8(180, 60, 40)),
)
}
///|
pub fn preset_ink(seed : UInt) -> DesignDocument {
make_design_document(
seed,
1000.0,
1400.0,
monochrome(Color::rgb8(20, 20, 20), 7),
)
}
///|
pub fn preset_neon(seed : UInt) -> DesignDocument {
make_design_document(
seed,
1200.0,
1200.0,
triadic_palette(Color::rgb8(240, 20, 160)),
)
}
///|
pub fn preset_calm(seed : UInt) -> DesignDocument {
make_design_document(seed, 1200.0, 1200.0, ocean_palette())
}
///|
pub fn preset_earth(seed : UInt) -> DesignDocument {
make_design_document(seed, 1200.0, 1200.0, forest_palette())
}
///|
pub fn preset_heat(seed : UInt) -> DesignDocument {
make_design_document(seed, 1200.0, 1200.0, thermal_palette(8))
}
///|
pub fn preset_sunrise(seed : UInt) -> DesignDocument {
make_design_document(seed, 1200.0, 800.0, sunset_palette())
}
///|
pub fn preset_moonlight(seed : UInt) -> DesignDocument {
make_design_document(
seed,
1200.0,
800.0,
monochrome(Color::rgb8(30, 45, 90), 6),
)
}
///|
pub fn preset_gallery(seed : UInt) -> DesignDocument {
make_design_document(
seed,
1800.0,
1200.0,
split_complementary_palette(Color::rgb8(80, 140, 190)),
)
}
///|
pub fn preset_fabric(seed : UInt) -> DesignDocument {
make_design_document(seed, 1400.0, 1400.0, ocean_palette())
}
///|
pub fn preset_tile(seed : UInt) -> DesignDocument {
make_design_document(seed, 600.0, 600.0, forest_palette())
}
///|
pub fn preset_dimensions(name : String) -> (Double, Double) {
match name {
"poster" => (1080.0, 1350.0)
"square" => (1080.0, 1080.0)
"banner" => (1600.0, 600.0)
"packaging" => (1200.0, 800.0)
"thumbnail" => (512.0, 512.0)
"story" => (1080.0, 1920.0)
"card" => (750.0, 1050.0)
"landscape" => (1600.0, 900.0)
_ => (800.0, 800.0)
}
}
///|
pub fn preset_names() -> Array[String] {
[
"poster", "square", "banner", "packaging", "thumbnail", "story", "card", "landscape",
"ink", "neon", "calm", "earth", "heat", "sunrise", "moonlight", "gallery", "fabric",
"tile",
]
}
///|
pub fn preset_document(name : String, seed : UInt) -> DesignDocument {
let dimensions = preset_dimensions(name)
let palette = match name {
"poster" | "sunrise" => sunset_palette()
"square" | "landscape" | "story" => ocean_palette()
"earth" | "fabric" | "tile" => forest_palette()
"heat" => thermal_palette(8)
_ => monochrome(Color::rgb8(40, 40, 40), 6)
}
make_design_document(seed, dimensions.0, dimensions.1, palette)
}