From 4a4c723c892237b7eb41325be1a72b5ec17337b4 Mon Sep 17 00:00:00 2001 From: jon Date: Tue, 26 Jul 2022 05:10:07 +0100 Subject: [PATCH] Fixed set_pen() --- libraries/pico_graphics/pico_graphics_pen_rgb888.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libraries/pico_graphics/pico_graphics_pen_rgb888.cpp b/libraries/pico_graphics/pico_graphics_pen_rgb888.cpp index f07b2171..311829f0 100644 --- a/libraries/pico_graphics/pico_graphics_pen_rgb888.cpp +++ b/libraries/pico_graphics/pico_graphics_pen_rgb888.cpp @@ -9,10 +9,10 @@ namespace pimoroni { } } void PicoGraphics_PenRGB888::set_pen(uint c) { - color = {c, c, c}; + color = RGB(c, c, c).to_rgb888(); } void PicoGraphics_PenRGB888::set_pen(uint8_t r, uint8_t g, uint8_t b) { - color = {r, g, b}; + color = RGB(r, g, b).to_rgb888(); } int PicoGraphics_PenRGB888::create_pen(uint8_t r, uint8_t g, uint8_t b) { return RGB(r, g, b).to_rgb888();