diff options
| author | Laurenz <laurmaedje@gmail.com> | 2020-12-27 19:23:26 +0100 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2020-12-27 19:23:26 +0100 |
| commit | 750d220bb080be077cd7ede6d18d485b1c3fb0c9 (patch) | |
| tree | 741bcbf9e286de6433a0677d4bcf8b93d70fb806 /src/eval/mod.rs | |
| parent | c44ebf876f6ab09fe1629d980efc5c4878a6a5a5 (diff) | |
Add color enum 🎨
Diffstat (limited to 'src/eval/mod.rs')
| -rw-r--r-- | src/eval/mod.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/eval/mod.rs b/src/eval/mod.rs index c2b80b68..ed73b07c 100644 --- a/src/eval/mod.rs +++ b/src/eval/mod.rs @@ -20,6 +20,7 @@ use fontdock::FontStyle; use crate::diag::Diag; use crate::diag::{Deco, Feedback, Pass}; +use crate::color::Color; use crate::env::SharedEnv; use crate::geom::{BoxAlign, Dir, Flow, Gen, Length, Linear, Relative, Sides, Size}; use crate::layout::{ @@ -436,7 +437,7 @@ impl Eval for Lit { Lit::Float(v) => Value::Float(v), Lit::Length(v, unit) => Value::Length(Length::with_unit(v, unit)), Lit::Percent(v) => Value::Relative(Relative::new(v / 100.0)), - Lit::Color(v) => Value::Color(v), + Lit::Color(v) => Value::Color(Color::Rgba(v)), Lit::Str(ref v) => Value::Str(v.clone()), Lit::Dict(ref v) => Value::Dict(v.eval(ctx)), Lit::Content(ref v) => Value::Content(v.clone()), |
