From ab5f7a45cfb4e5c83acda0a48bc07b7d96c82977 Mon Sep 17 00:00:00 2001 From: Jan Vos Date: Tue, 17 Mar 2026 23:13:16 +0100 Subject: [PATCH 1/8] fix purple brightness scaling --- src/loopback_renderer.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/loopback_renderer.h b/src/loopback_renderer.h index a90f2fb9..ca61d720 100644 --- a/src/loopback_renderer.h +++ b/src/loopback_renderer.h @@ -169,10 +169,9 @@ constexpr RGB888 blue_base(uint8_t brightness) { } constexpr RGB888 purple_base(uint8_t brightness) { - // Purple: R=128, G=0, B=128 const uint16_t scale = brightness * 17; - return RGB888(static_cast(scale * 128 / 255), 0, - static_cast(scale * 128 / 255)); + return RGB888(static_cast(scale), 0, + static_cast(scale)); } constexpr RGB888 pink_base(uint8_t brightness) { From 472a5ac1cf75f4ef7b50191a3b6f6f9012fe5bc8 Mon Sep 17 00:00:00 2001 From: Jan Vos Date: Tue, 17 Mar 2026 23:32:52 +0100 Subject: [PATCH 2/8] fix colors --- src/loopback_renderer.h | 37 ++++++++++++++++++++++++------------- 1 file changed, 24 insertions(+), 13 deletions(-) diff --git a/src/loopback_renderer.h b/src/loopback_renderer.h index ca61d720..e6217153 100644 --- a/src/loopback_renderer.h +++ b/src/loopback_renderer.h @@ -140,46 +140,57 @@ static constexpr std::array kCapcomBrightnessMap = static constexpr std::array kGottliebBrightnessMap = make_brightness_map(7); -// Color base functions definitions +// ------------- Color base functions definitions ------------- +// Color values are done in a way that they are less harsh to the eye. +// We do this by mixing in some lower value colors with the primary colors. +// Rule of thumb: avoid fully saturated extremes. Instead add warmth and depth +// → makes it look more organic. constexpr RGB888 orange_base(uint8_t brightness) { // Orange: R=255, G=165, B=0 scaled with brightness const uint16_t scale = brightness * 17; // 0-15 -> 0-255 (≈17 per step) return RGB888(static_cast(scale), - static_cast(scale * 165 / 255), 0); + static_cast(scale * 128 / 255), 0); } constexpr RGB888 red_base(uint8_t brightness) { const uint16_t scale = brightness * 17; - return RGB888(static_cast(scale), 0, 0); + return RGB888(static_cast(scale), + static_cast(scale * 30 / 255), + static_cast(scale * 30 / 255)); } -constexpr RGB888 yellow_base(uint8_t brightness) { +constexpr RGB888 green_base(uint8_t brightness) { const uint16_t scale = brightness * 17; - return RGB888(static_cast(scale), static_cast(scale), 0); + return RGB888(static_cast(scale * 30 / 255), + static_cast(scale), + static_cast(scale * 30 / 255)); } -constexpr RGB888 green_base(uint8_t brightness) { +constexpr RGB888 blue_base(uint8_t brightness) { const uint16_t scale = brightness * 17; - return RGB888(0, static_cast(scale), 0); + return RGB888(static_cast(scale * 30 / 255), + static_cast(scale * 30 / 255), + static_cast(scale)); } -constexpr RGB888 blue_base(uint8_t brightness) { +constexpr RGB888 yellow_base(uint8_t brightness) { const uint16_t scale = brightness * 17; - return RGB888(0, 0, static_cast(scale)); + return RGB888(static_cast(scale), static_cast(scale), + static_cast(scale * 30 / 255)); } constexpr RGB888 purple_base(uint8_t brightness) { const uint16_t scale = brightness * 17; - return RGB888(static_cast(scale), 0, + return RGB888(static_cast(scale), + static_cast(scale * 30 / 255), static_cast(scale)); } constexpr RGB888 pink_base(uint8_t brightness) { - // Pink: R=255, G=192, B=203 const uint16_t scale = brightness * 17; return RGB888(static_cast(scale), - static_cast(scale * 192 / 255), - static_cast(scale * 203 / 255)); + static_cast(scale * 30 / 255), + static_cast(scale)); } constexpr RGB888 white_base(uint8_t brightness) { From 2cb635e2a3dcc60e67fd0ece4398d38d36d24021 Mon Sep 17 00:00:00 2001 From: Jan Vos Date: Tue, 17 Mar 2026 23:34:49 +0100 Subject: [PATCH 3/8] forgot purple --- src/loopback_renderer.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/loopback_renderer.h b/src/loopback_renderer.h index e6217153..d125afb2 100644 --- a/src/loopback_renderer.h +++ b/src/loopback_renderer.h @@ -181,7 +181,7 @@ constexpr RGB888 yellow_base(uint8_t brightness) { constexpr RGB888 purple_base(uint8_t brightness) { const uint16_t scale = brightness * 17; - return RGB888(static_cast(scale), + return RGB888(static_cast(scale * 128 / 255), static_cast(scale * 30 / 255), static_cast(scale)); } From e23b1edd71cad6436c0d69aec2b7c100541557ad Mon Sep 17 00:00:00 2001 From: Jan Vos Date: Tue, 17 Mar 2026 23:35:19 +0100 Subject: [PATCH 4/8] gottlieb uses 6 planes --- src/loopback_renderer.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/loopback_renderer.h b/src/loopback_renderer.h index d125afb2..372b085a 100644 --- a/src/loopback_renderer.h +++ b/src/loopback_renderer.h @@ -138,7 +138,7 @@ constexpr std::array make_brightness_map(uint8_t max_value) { static constexpr std::array kCapcomBrightnessMap = make_brightness_map(4); static constexpr std::array kGottliebBrightnessMap = - make_brightness_map(7); + make_brightness_map(6); // ------------- Color base functions definitions ------------- // Color values are done in a way that they are less harsh to the eye. From f423c8e6355d40285d5c9923cc1879a15c307c1d Mon Sep 17 00:00:00 2001 From: Jan Vos Date: Tue, 17 Mar 2026 23:37:24 +0100 Subject: [PATCH 5/8] fix comment --- src/loopback_renderer.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/loopback_renderer.h b/src/loopback_renderer.h index 372b085a..61563a13 100644 --- a/src/loopback_renderer.h +++ b/src/loopback_renderer.h @@ -146,7 +146,7 @@ static constexpr std::array kGottliebBrightnessMap = // Rule of thumb: avoid fully saturated extremes. Instead add warmth and depth // → makes it look more organic. constexpr RGB888 orange_base(uint8_t brightness) { - // Orange: R=255, G=165, B=0 scaled with brightness + // Orange: R=255, G=128, B=0 scaled with brightness const uint16_t scale = brightness * 17; // 0-15 -> 0-255 (≈17 per step) return RGB888(static_cast(scale), static_cast(scale * 128 / 255), 0); From 750d152c0f3694cc0831fad4018c0d4374f265ce Mon Sep 17 00:00:00 2001 From: Jan Vos Date: Wed, 18 Mar 2026 00:18:12 +0100 Subject: [PATCH 6/8] colors were slightly too soft --- src/loopback_renderer.h | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/loopback_renderer.h b/src/loopback_renderer.h index 61563a13..0b55f59c 100644 --- a/src/loopback_renderer.h +++ b/src/loopback_renderer.h @@ -146,50 +146,50 @@ static constexpr std::array kGottliebBrightnessMap = // Rule of thumb: avoid fully saturated extremes. Instead add warmth and depth // → makes it look more organic. constexpr RGB888 orange_base(uint8_t brightness) { - // Orange: R=255, G=128, B=0 scaled with brightness + // Orange: R=255, G=110, B=0 scaled with brightness const uint16_t scale = brightness * 17; // 0-15 -> 0-255 (≈17 per step) return RGB888(static_cast(scale), - static_cast(scale * 128 / 255), 0); + static_cast(scale * 110 / 255), 0); } constexpr RGB888 red_base(uint8_t brightness) { const uint16_t scale = brightness * 17; return RGB888(static_cast(scale), - static_cast(scale * 30 / 255), - static_cast(scale * 30 / 255)); + static_cast(scale * 20 / 255), + static_cast(scale * 20 / 255)); } constexpr RGB888 green_base(uint8_t brightness) { const uint16_t scale = brightness * 17; - return RGB888(static_cast(scale * 30 / 255), + return RGB888(static_cast(scale * 20 / 255), static_cast(scale), - static_cast(scale * 30 / 255)); + static_cast(scale * 20 / 255)); } constexpr RGB888 blue_base(uint8_t brightness) { const uint16_t scale = brightness * 17; - return RGB888(static_cast(scale * 30 / 255), - static_cast(scale * 30 / 255), + return RGB888(static_cast(scale * 20 / 255), + static_cast(scale * 20 / 255), static_cast(scale)); } constexpr RGB888 yellow_base(uint8_t brightness) { const uint16_t scale = brightness * 17; return RGB888(static_cast(scale), static_cast(scale), - static_cast(scale * 30 / 255)); + static_cast(scale * 20 / 255)); } constexpr RGB888 purple_base(uint8_t brightness) { const uint16_t scale = brightness * 17; return RGB888(static_cast(scale * 128 / 255), - static_cast(scale * 30 / 255), + static_cast(scale * 20 / 255), static_cast(scale)); } constexpr RGB888 pink_base(uint8_t brightness) { const uint16_t scale = brightness * 17; return RGB888(static_cast(scale), - static_cast(scale * 30 / 255), + static_cast(scale * 20 / 255), static_cast(scale)); } From 641ed8df4fdff73702795b1840d5925f6d556d4e Mon Sep 17 00:00:00 2001 From: Jan Vos Date: Wed, 18 Mar 2026 00:59:03 +0100 Subject: [PATCH 7/8] slight adjustment to orange --- src/loopback_renderer.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/loopback_renderer.h b/src/loopback_renderer.h index 0b55f59c..2dd56266 100644 --- a/src/loopback_renderer.h +++ b/src/loopback_renderer.h @@ -149,7 +149,7 @@ constexpr RGB888 orange_base(uint8_t brightness) { // Orange: R=255, G=110, B=0 scaled with brightness const uint16_t scale = brightness * 17; // 0-15 -> 0-255 (≈17 per step) return RGB888(static_cast(scale), - static_cast(scale * 110 / 255), 0); + static_cast(scale * 115 / 255), 0); } constexpr RGB888 red_base(uint8_t brightness) { From 04a3d9bf0cf8dbaff0d8008b52a9d341c376cf7b Mon Sep 17 00:00:00 2001 From: Jan Vos Date: Wed, 18 Mar 2026 01:02:20 +0100 Subject: [PATCH 8/8] comment --- src/loopback_renderer.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/loopback_renderer.h b/src/loopback_renderer.h index 2dd56266..265e5274 100644 --- a/src/loopback_renderer.h +++ b/src/loopback_renderer.h @@ -146,7 +146,7 @@ static constexpr std::array kGottliebBrightnessMap = // Rule of thumb: avoid fully saturated extremes. Instead add warmth and depth // → makes it look more organic. constexpr RGB888 orange_base(uint8_t brightness) { - // Orange: R=255, G=110, B=0 scaled with brightness + // Orange: R=255, G=115, B=0 scaled with brightness const uint16_t scale = brightness * 17; // 0-15 -> 0-255 (≈17 per step) return RGB888(static_cast(scale), static_cast(scale * 115 / 255), 0);