How do I change the color of the Imgui menu?

ShadowBro

User
Mar 22, 2023
2
0
Hello all! I found the source code of the menu reader imgui for the game csgo and would like to replace the standard blue color with something else, such as purple or multicolor.
 
Solution
To change the color of the ImGUI menu to purple, you will need to modify the style settings of your ImGUI instance. Here is some example code using the ImGui library in C++ that demonstrates how to change the color of the menu to purple:

C++:
ImGui::StyleColorsDark();
ImVec4* colors = ImGui::GetStyle().Colors;
colors[ImGuiCol_MenuBarBg] = ImVec4(0.4f, 0.0f, 0.4f, 1.0f);

To make the ImGUI menu multicolor, you can use the same ImGui::GetStyle() function that was used in the previous answer and modify different color elements in the array to achieve the desired effect. Here's an example that changes the menu bar background color to a gradient of purple and blue:

C++:
ImGui::StyleColorsDark();
ImVec4* colors = ImGui::GetStyle().Colors;
colors[ImGuiCol_MenuBarBg] =...

Neo

Owner
Apr 13, 2022
20
8
To change the color of the ImGUI menu to purple, you will need to modify the style settings of your ImGUI instance. Here is some example code using the ImGui library in C++ that demonstrates how to change the color of the menu to purple:

C++:
ImGui::StyleColorsDark();
ImVec4* colors = ImGui::GetStyle().Colors;
colors[ImGuiCol_MenuBarBg] = ImVec4(0.4f, 0.0f, 0.4f, 1.0f);

To make the ImGUI menu multicolor, you can use the same ImGui::GetStyle() function that was used in the previous answer and modify different color elements in the array to achieve the desired effect. Here's an example that changes the menu bar background color to a gradient of purple and blue:

C++:
ImGui::StyleColorsDark();
ImVec4* colors = ImGui::GetStyle().Colors;
colors[ImGuiCol_MenuBarBg] = ImVec4(0.6f, 0.0f, 0.6f, 1.0f);
colors[ImGuiCol_MenuBarBgHovered] = ImVec4(0.4f, 0.0f, 0.8f, 1.0f);
colors[ImGuiCol_MenuBarBgActive] = ImVec4(0.2f, 0.0f, 1.0f, 1.0f);
 
Solution
Top