mirror of
https://codeberg.org/unspeaker/tengri.git
synced 2026-04-03 13:30:44 +02:00
This commit is contained in:
parent
4e8d58d793
commit
b0fbe3c173
18 changed files with 1724 additions and 1808 deletions
19
src/color.rs
Normal file
19
src/color.rs
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
pub(crate) use ::palette::Okhsl;
|
||||
|
||||
pub trait HasColor { fn color (&self) -> ItemColor; }
|
||||
|
||||
pub struct ItemColor {}
|
||||
|
||||
pub struct ItemTheme {}
|
||||
|
||||
#[macro_export] macro_rules! has_color {
|
||||
(|$self:ident:$Struct:ident$(<$($L:lifetime),*$($T:ident$(:$U:path)?),*>)?|$cb:expr) => {
|
||||
impl $(<$($L),*$($T $(: $U)?),*>)? HasColor for $Struct $(<$($L),*$($T),*>)? {
|
||||
fn color (&$self) -> ItemColor { $cb }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub fn rgb (r: u8, g: u8, b: u8) -> ItemColor {
|
||||
todo!();
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue