color-span 0.2.1

Color shared definition
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use indexmap::IndexSet;

use crate::Palette;

impl Default for Palette {
    fn default() -> Self {
        Self { classes: IndexSet::from_iter(vec!["".to_string()]) }
    }
}

impl<T> From<T> for Palette
where
    T: AsRef<str>,
{
    fn from(value: T) -> Self {
        Palette::default().with_text(value.as_ref())
    }
}