mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-20 00:51:42 +00:00
[wpilib] Improve Color.toString (#4450)
This commit is contained in:
@@ -34,8 +34,7 @@ MechanismRoot2d* Mechanism2d::GetRoot(std::string_view name, double x,
|
||||
}
|
||||
|
||||
void Mechanism2d::SetBackgroundColor(const Color8Bit& color) {
|
||||
std::snprintf(m_color, sizeof(m_color), "#%02X%02X%02X", color.red,
|
||||
color.green, color.blue);
|
||||
m_color = color.HexString();
|
||||
if (m_table) {
|
||||
m_table->GetEntry(kBackgroundColor).SetString(m_color);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user