31 const ImVec4 primary =
33 const std::string name = absl::StrFormat(
34 "yaze_theme_%08X", ImGui::ColorConvertFloat4ToU32(primary));
35 const ImPlotColormap existing = ImPlot::GetColormapIndex(name.c_str());
40 std::vector<ImVec4> colors = {primary};
41 const int deep_size = ImPlot::GetColormapSize(ImPlotColormap_Deep);
42 for (
int i = 0; i < deep_size; ++i) {
43 const ImVec4 color = ImPlot::GetColormapColor(i, ImPlotColormap_Deep);
45 colors.push_back(color);
48 return ImPlot::AddColormap(name.c_str(), colors.data(),
49 static_cast<int>(colors.size()),
true);
59 style.DigitalSpacing = ImGui::GetStyle().ItemSpacing.y * 0.5f;
60 style.PlotBorderSize = 1.0f;
62 style.MajorTickLen = ImVec2(6.0f, 6.0f);
63 style.MinorTickLen = ImVec2(3.0f, 3.0f);
64 style.MajorTickSize = ImVec2(1.0f, 1.0f);
65 style.MinorTickSize = ImVec2(1.0f, 1.0f);
66 style.MajorGridSize = ImVec2(1.0f, 1.0f);
67 style.MinorGridSize = ImVec2(1.0f, 1.0f);
76 style.FitPadding = ImVec2(0.05f, 0.05f);
77 style.PlotDefaultSize = ImVec2(420, 280);
78 style.PlotMinSize = ImVec2(220, 160);
81 style.UseLocalTime =
true;
84 style.Colors[ImPlotCol_FrameBg] =
86 style.Colors[ImPlotCol_PlotBg] =
88 style.Colors[ImPlotCol_PlotBorder] =
90 style.Colors[ImPlotCol_LegendBg] =
92 style.Colors[ImPlotCol_LegendBorder] =
94 style.Colors[ImPlotCol_LegendText] =
96 style.Colors[ImPlotCol_TitleText] =
98 style.Colors[ImPlotCol_InlayText] =
100 style.Colors[ImPlotCol_AxisText] =
102 style.Colors[ImPlotCol_AxisGrid] =
104 style.Colors[ImPlotCol_AxisTick] =
106 style.Colors[ImPlotCol_AxisBg] =
108 style.Colors[ImPlotCol_AxisBgHovered] =
110 style.Colors[ImPlotCol_AxisBgActive] =
112 style.Colors[ImPlotCol_Selection] =
114 style.Colors[ImPlotCol_Crosshairs] =