use num_enum::{IntoPrimitive, TryFromPrimitive};

/// The style to apply to a glyph.
///
/// Each nibble represents a color in the first palette, the lower nibble for the character, and the
/// upper nibble for the background.
///
/// A background color of 0 means the background is transparent but the glyph is outlines in black.
#[derive(Clone, Copy, Debug, Eq, IntoPrimitive, Ord, PartialEq, PartialOrd, TryFromPrimitive)]
#[repr(u8)]
pub enum Style {
    WhiteOnTransparent = 0x0f,
    BlackOnBlack = 0x11,
    BlueOnBlack = 0x1a,
    LightBlueOnBlack = 0x1b,
    RedOnBlack = 0x18,
    YellowOnBlack = 0x1e,
    WhiteOnBlack = 0x1f,
    WhiteOnBlue = 0xaf,
}
