tracy icon indicating copy to clipboard operation
tracy copied to clipboard

Light theme

Open Kampfkarren opened this issue 2 years ago • 4 comments

It would be nice if the Tracy Profiler program supported a light theme. I use light theme on most of my programs as an accessibility feature, because I find it far easier to read as my eyesight gets worse.

Kampfkarren avatar Nov 03 '22 01:11 Kampfkarren

You may try changing fragment_shader_glsl_130 in profiler/src/imgui/imgui_impl_opengl3.cpp to be as such:

const GLchar* fragment_shader_glsl_130 =
    "uniform sampler2D Texture;\n"
    "in vec2 Frag_UV;\n"
    "in vec4 Frag_Color;\n"
    "out vec4 Out_Color;\n"
    "void main()\n"
    "{\n"
    "    vec4 c = Frag_Color * texture(Texture, Frag_UV.st);\n"
    "    float h = 1 - min(c.r, min(c.g, c.b)) - max(c.r, max(c.g, c.b));\n"
    "    Out_Color = vec4(h+c.r, h+c.g, h+c.b, c.a);\n"
    "}\n";

This gives the following effect:

obraz

wolfpld avatar Nov 04 '22 00:11 wolfpld

Alternatively, you can change the settings from ImGui::GetStyle() like this example: https://gist.github.com/dougbinks/8089b4bbaccaaf6fa204236978d165a9#file-imguiutils-h-L9-L93

People have posted their custom settings in this thread (https://github.com/ocornut/imgui/issues/707), so you can probably select the one that you like best and copy/paste in the source code somewhere.

lasagnaphil avatar Nov 30 '22 07:11 lasagnaphil

Colors in certain parts of the UI are hardcoded to match the dark theme, so changing the used theme to a light one will make things clash.

wolfpld avatar Nov 30 '22 10:11 wolfpld

That's a very good point. The shader workaround seems like a better temporary solution.

lasagnaphil avatar Dec 01 '22 05:12 lasagnaphil