tui-banner 0.2.1

Colorful ASCII art banner renderer for Rust CLI/TUI
Documentation
// Copyright (c) 2025 Lei Zhang
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

use crate::color::Preset;

/// Named banner styles.
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum Style {
    /// Neon Cyber (cyan -> purple -> pink).
    NeonCyber,
    /// Arctic Tech (cyan -> blue -> white).
    ArcticTech,
    /// Sunset Neon (orange -> pink -> purple).
    SunsetNeon,
    /// Forest Sky (green -> teal -> blue).
    ForestSky,
    /// Chrome (silver metallic).
    Chrome,
    /// CRT Amber (retro amber).
    CrtAmber,
    /// Ocean Flow (blue -> teal -> aqua).
    OceanFlow,
    /// Deep Space (blue -> purple -> indigo).
    DeepSpace,
    /// Fire Warning (yellow -> orange -> red).
    FireWarning,
    /// Warm Luxury (pink -> coral -> gold).
    WarmLuxury,
    /// Earth Tone (sand -> earth -> olive).
    EarthTone,
    /// Royal Purple (lavender -> purple -> deep purple).
    RoyalPurple,
    /// Matrix (neon green -> deep green).
    Matrix,
    /// Aurora Flux (teal -> sky blue -> violet -> aurora purple).
    AuroraFlux,
}

impl Style {
    pub(crate) fn preset(self) -> Preset {
        match self {
            Style::NeonCyber => Preset::NeonCyber,
            Style::ArcticTech => Preset::ArcticTech,
            Style::SunsetNeon => Preset::SunsetNeon,
            Style::ForestSky => Preset::ForestSky,
            Style::Chrome => Preset::Chrome,
            Style::CrtAmber => Preset::CrtAmber,
            Style::OceanFlow => Preset::OceanFlow,
            Style::DeepSpace => Preset::DeepSpace,
            Style::FireWarning => Preset::FireWarning,
            Style::WarmLuxury => Preset::WarmLuxury,
            Style::EarthTone => Preset::EarthTone,
            Style::RoyalPurple => Preset::RoyalPurple,
            Style::Matrix => Preset::Matrix,
            Style::AuroraFlux => Preset::AuroraFlux,
        }
    }
}