summaryrefslogtreecommitdiff
path: root/src/library/utility.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/library/utility.rs')
-rw-r--r--src/library/utility.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/library/utility.rs b/src/library/utility.rs
index 6d15a823..b2435e8a 100644
--- a/src/library/utility.rs
+++ b/src/library/utility.rs
@@ -86,7 +86,7 @@ pub fn str(_: &mut EvalContext, args: &mut Args) -> TypResult<Value> {
/// `rgb`: Create an RGB(A) color.
pub fn rgb(_: &mut EvalContext, args: &mut Args) -> TypResult<Value> {
- Ok(Value::Color(Color::Rgba(
+ Ok(Value::from(
if let Some(string) = args.find::<Spanned<EcoString>>() {
match RgbaColor::from_str(&string.v) {
Ok(color) => color,
@@ -106,7 +106,7 @@ pub fn rgb(_: &mut EvalContext, args: &mut Args) -> TypResult<Value> {
};
RgbaColor::new(f(r)?, f(g)?, f(b)?, f(a)?)
},
- )))
+ ))
}
/// `abs`: The absolute value of a numeric value.