Nimbin[12]?SDL & Graphics / sdl_runtime_compiler / commits / 9a0eff6

sdl_runtime_compiler git · main

SDL3 game for running and compiling code at runtime

sdl3 c++ compiler dlopen cmake · first commit 2026-04-19 · last commit 2026-07-03 (3 months ago) · synced 3 days ago · upstream: git.ide3.de/hsnr/sdl-runtime-compiler

C++ 72.3% C 26.2%
git clone https://git.christianimmanuel.de/sdl-graphics/sdl_runtime_compiler.gitwget https://git.christianimmanuel.de/sdl-graphics/sdl_runtime_compiler/archive/sdl_runtime_compiler.tar.gz

Globalize colors

Christian Immanuel · 2026-06-05 07:07 · 9a0eff649c87ff66f2ddb15eb6957c048a1c373e

 src/utils/config.hpp    | 43 ++++++++++++++++++++++++++++++-------------
 src/wall/wall_label.cpp | 10 +++++-----
 2 files changed, 35 insertions(+), 18 deletions(-)

diff --git a/src/utils/config.hpp b/src/utils/config.hpp
index 0a2658a..ee5b331 100644
--- a/src/utils/config.hpp
+++ b/src/utils/config.hpp
@@ -43,21 +43,38 @@ namespace ConfigColors
     static inline constexpr SDL_FColor color_magenta = {1.0f, 0.0f, 1.0f, 1.0f};
     static inline constexpr SDL_FColor color_black   = {0.0f, 0.0f, 0.0f, 1.0f};
     static inline constexpr SDL_FColor color_gray    = {0.5f, 0.5f, 0.5f, 1.0f};
-    static inline constexpr SDL_FColor color_orange     = {1.0f,  0.55f, 0.10f, 1.0f};
-    static inline constexpr SDL_FColor color_amber      = {1.0f,  0.75f, 0.20f, 1.0f};
-    static inline constexpr SDL_FColor color_lime       = {0.65f, 0.95f, 0.25f, 1.0f};
-    static inline constexpr SDL_FColor color_teal       = {0.0f,  0.65f, 0.60f, 1.0f};
-    static inline constexpr SDL_FColor color_sky        = {0.40f, 0.70f, 1.0f,  1.0f};
-    static inline constexpr SDL_FColor color_indigo     = {0.30f, 0.30f, 0.80f, 1.0f};
-    static inline constexpr SDL_FColor color_purple     = {0.60f, 0.30f, 0.85f, 1.0f};
-    static inline constexpr SDL_FColor color_pink       = {1.0f,  0.34f, 0.87f, 1.0f};
-    static inline constexpr SDL_FColor color_brown      = {0.55f, 0.35f, 0.20f, 1.0f};
-    static inline constexpr SDL_FColor color_dark_gray  = {0.25f, 0.25f, 0.25f, 1.0f};
-    static inline constexpr SDL_FColor color_light_gray = {0.82f, 0.82f, 0.82f, 1.0f};
-
-    static inline constexpr SDL_FColor color_compiler = color_white;
+    static inline constexpr SDL_FColor color_soft_blue   = {0.55f, 0.72f, 0.92f, 1.0f};
+    static inline constexpr SDL_FColor color_slate_blue  = {0.42f, 0.52f, 0.63f, 1.0f};
+    static inline constexpr SDL_FColor color_orange      = {1.0f,  0.55f, 0.10f, 1.0f};
+    static inline constexpr SDL_FColor color_amber       = {1.0f,  0.75f, 0.20f, 1.0f};
+    static inline constexpr SDL_FColor color_lime        = {0.65f, 0.95f, 0.25f, 1.0f};
+    static inline constexpr SDL_FColor color_teal        = {0.0f,  0.65f, 0.60f, 1.0f};
+    static inline constexpr SDL_FColor color_sky         = {0.40f, 0.70f, 1.0f,  1.0f};
+    static inline constexpr SDL_FColor color_pale_sky    = {0.80f, 0.90f, 1.00f, 1.0f};
+    static inline constexpr SDL_FColor color_indigo      = {0.30f, 0.30f, 0.80f, 1.0f};
+    static inline constexpr SDL_FColor color_deep_indigo = {0.06f, 0.05f, 0.12f, 1.0f};
+    static inline constexpr SDL_FColor color_light_indigo= {0.70f, 0.65f, 1.00f, 1.0f};
+    static inline constexpr SDL_FColor color_warm_ivory  = {0.95f, 0.92f, 0.82f, 1.0f};
+    static inline constexpr SDL_FColor color_purple      = {0.60f, 0.30f, 0.85f, 1.0f};
+    static inline constexpr SDL_FColor color_pink        = {1.0f,  0.34f, 0.87f, 1.0f};
+    static inline constexpr SDL_FColor color_brown       = {0.55f, 0.35f, 0.20f, 1.0f};
+    static inline constexpr SDL_FColor color_dark_gray   = {0.25f, 0.25f, 0.25f, 1.0f};
+    static inline constexpr SDL_FColor color_light_gray  = {0.82f, 0.82f, 0.82f, 1.0f};
+    static inline constexpr SDL_FColor color_cream_paper = {0.066f, 0.113f, 0.18f, 1.0f};
+    static inline constexpr SDL_FColor color_bronze_ink  = {0.48f, 0.36f, 0.16f, 1.0f};
+
+
     static inline constexpr SDL_FColor color_floor    = color_blue;
     static inline constexpr SDL_FColor color_wall     = color_green;
+
+    static inline constexpr SDL_FColor color_compiler       = color_deep_indigo;
+    static inline constexpr SDL_FColor color_compiler_label = color_light_indigo;
+    static inline constexpr SDL_FColor color_info           = color_slate_blue;
+    static inline constexpr SDL_FColor color_info_label     = color_pale_sky;
+    static inline constexpr SDL_FColor color_program        = color_warm_ivory;
+    static inline constexpr SDL_FColor color_program_label  = color_bronze_ink;
+    static inline constexpr SDL_FColor color_editor         = color_cream_paper;
+    static inline constexpr SDL_FColor color_editor_label   = color_soft_blue;
 }
 
 
diff --git a/src/wall/wall_label.cpp b/src/wall/wall_label.cpp
index 75a40bb..6ec68b6 100644
--- a/src/wall/wall_label.cpp
+++ b/src/wall/wall_label.cpp
@@ -24,10 +24,10 @@ static const char* label_Name(Wall::Role r)
 static SDL_FColor label_Color(Wall::Role r)
 {
     switch (r) {
-        case Wall::Role::Program:  return { 0.95f, 0.92f, 0.82f, 1.0f }; // warm ivory
-        case Wall::Role::Editor:   return { 0.55f, 0.72f, 0.92f, 1.0f }; // soft blue
-        case Wall::Role::Info:     return { 0.80f, 0.90f, 1.00f, 1.0f }; // pale sky
-        case Wall::Role::Compiler: return { 0.70f, 0.65f, 1.00f, 1.0f }; // light indigo
+        case Wall::Role::Program:  return ConfigColors::color_program_label;
+        case Wall::Role::Editor:   return ConfigColors::color_editor_label;
+        case Wall::Role::Info:     return ConfigColors::color_info_label;
+        case Wall::Role::Compiler: return ConfigColors::color_compiler_label;
     }
     return ConfigColors::color_white;
 }
@@ -43,7 +43,7 @@ WallLabel::generate_All(float world_scale)
     DynArray<WallLabel> labels;
     labels.reserve(4);
 
-    const float label_y = -world_scale * 0.68f;
+    const float label_y = -world_scale * 0.48f;
 
     // Pull slightly further from the wall so it floats in front of wall text.
     const double extra_offset = 2.5f;