summaryrefslogtreecommitdiff
path: root/src/geom/paint.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/geom/paint.rs')
-rw-r--r--src/geom/paint.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/geom/paint.rs b/src/geom/paint.rs
index 351ef443..9b310249 100644
--- a/src/geom/paint.rs
+++ b/src/geom/paint.rs
@@ -154,7 +154,7 @@ impl FromStr for RgbaColor {
impl From<SynColor> for RgbaColor {
fn from(color: SynColor) -> Self {
- Self::new(color.r, color.b, color.g, color.a)
+ Self::new(color.r, color.g, color.b, color.a)
}
}
@@ -167,10 +167,11 @@ impl Debug for RgbaColor {
self.r, self.g, self.b, self.a,
)?;
} else {
- write!(f, "#{:02x}{:02x}{:02x}", self.r, self.g, self.b)?;
+ write!(f, "rgb(\"#{:02x}{:02x}{:02x}", self.r, self.g, self.b)?;
if self.a != 255 {
write!(f, "{:02x}", self.a)?;
}
+ write!(f, "\")")?;
}
Ok(())
}