Skip to content

Commit

Permalink
Use hex triplet in RGB color serializer
Browse files Browse the repository at this point in the history
  • Loading branch information
ku1ik committed Nov 5, 2024
1 parent 42f2135 commit c09e1d2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/vt/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ impl Serialize for Color {

match self.0 {
Color::Indexed(c) => serializer.serialize_u8(c),
Color::RGB(c) => serializer.serialize_str(&format!("rgb({},{},{})", c.r, c.g, c.b)),
Color::RGB(c) => serializer.serialize_str(&format!("#{:02x}{:02x}{:02x}", c.r, c.g, c.b)),
}
}
}

0 comments on commit c09e1d2

Please sign in to comment.