Skip to content

Instantly share code, notes, and snippets.

@Nullious Nullious/C64Colors.cpp
Last active Aug 28, 2019

Embed
What would you like to do?
ImGui C64 color scheme
#define C64_BLACK ImVec4(0,0,0,1)
#define C64_WHITE ImVec4(1,1,1,1)
#define C64_RED ImVec4(136/255.0f,57/255.0f,50/255.0f,1.0f)
#define C64_CYAN ImVec4(103/255.0f,182/255.0f,189/255.0f,1.0f)
#define C64_PURPLE ImVec4(139/255.0f,63/255.0f,150/255.0f,1.0f)
#define C64_GREEN ImVec4(85/255.0f,160/255.0f,73/255.0f,1.0f)
#define C64_BLUE ImVec4(64/255.0f,49/255.0f,141/255.0f,1.0f)
#define C64_YELLOW ImVec4(191/255.0f,206/255.0f,114/255.0f,1.0f)
#define C64_ORANGE ImVec4(139/255.0f,84/255.0f,41/255.0f,1.0f)
#define C64_BROWN ImVec4(87/255.0f,66/255.0f,0/255.0f,1.0f)
#define C64_PINK ImVec4(184/255.0f,105/255.0f,98/255.0f,1.0f)
#define C64_DGRAY ImVec4(80/255.0f,80/255.0f,80/255.0f,1.0f)
#define C64_MGRAY ImVec4(120/255.0f,120/255.0f,120/255.0f,1.0f)
#define C64_LGREEN ImVec4(148/255.0f,224/255.0f,137/255.0f,1.0f)
#define C64_LBLUE ImVec4(120/255.0f,105/255.0f,196/255.0f,1.0f)
#define C64_LGRAY ImVec4(159/255.0f,159/255.0f,159/255.0f,1.0f)
void StyleC64()
{
ImVec4* colors = ImGui::GetStyle().Colors;
colors[ImGuiCol_Text] = C64_WHITE;
colors[ImGuiCol_TextDisabled] = C64_BLACK;
colors[ImGuiCol_WindowBg] = C64_LBLUE;
colors[ImGuiCol_ChildBg] = C64_LBLUE;
colors[ImGuiCol_PopupBg] = C64_GREEN;
colors[ImGuiCol_Border] = C64_BLUE;
colors[ImGuiCol_BorderShadow] = C64_BLACK;
colors[ImGuiCol_FrameBg] = C64_BROWN;
colors[ImGuiCol_FrameBgHovered] = C64_ORANGE;
colors[ImGuiCol_FrameBgActive] = C64_PINK;
colors[ImGuiCol_TitleBg] = C64_DGRAY;
colors[ImGuiCol_TitleBgActive] = C64_MGRAY;
colors[ImGuiCol_TitleBgCollapsed] = C64_BLACK;
colors[ImGuiCol_MenuBarBg] = C64_BLUE;
colors[ImGuiCol_ScrollbarBg] = C64_BLACK;
colors[ImGuiCol_ScrollbarGrab] = C64_LGRAY;
colors[ImGuiCol_ScrollbarGrabHovered] = C64_GREEN;
colors[ImGuiCol_ScrollbarGrabActive] = C64_LGREEN;
colors[ImGuiCol_CheckMark] = C64_YELLOW;
colors[ImGuiCol_SliderGrab] = C64_LGRAY;
colors[ImGuiCol_SliderGrabActive] = C64_LGREEN;
colors[ImGuiCol_Button] = C64_BLUE;
colors[ImGuiCol_ButtonHovered] = C64_CYAN;
colors[ImGuiCol_ButtonActive] = C64_LBLUE;
colors[ImGuiCol_Header] = C64_BLUE;
colors[ImGuiCol_HeaderHovered] = C64_CYAN;
colors[ImGuiCol_HeaderActive] = C64_LBLUE;
colors[ImGuiCol_Separator] = C64_BLUE;
colors[ImGuiCol_SeparatorHovered] = C64_BLUE;
colors[ImGuiCol_SeparatorActive] = C64_BLUE;
colors[ImGuiCol_ResizeGrip] = C64_WHITE;
colors[ImGuiCol_ResizeGripHovered] = C64_LGREEN;
colors[ImGuiCol_ResizeGripActive] = C64_GREEN;
colors[ImGuiCol_PlotLines] = C64_LGREEN;
colors[ImGuiCol_PlotLinesHovered] = C64_WHITE;
colors[ImGuiCol_PlotHistogram] = C64_WHITE;
colors[ImGuiCol_PlotHistogramHovered] = C64_WHITE;
colors[ImGuiCol_TextSelectedBg] = C64_BLACK;
colors[ImGuiCol_ModalWindowDarkening] = C64_BLACK;
colors[ImGuiCol_DragDropTarget] = C64_YELLOW;
colors[ImGuiCol_NavHighlight] = C64_PURPLE;
colors[ImGuiCol_NavWindowingHighlight] = C64_PINK;
ImGuiStyle& style = ImGui::GetStyle();
style.FramePadding = ImVec2(8,1);
style.FrameRounding = 0;
style.WindowBorderSize = 0;
style.WindowPadding = ImVec2(0,0);
style.PopupBorderSize = 0;
style.PopupRounding = 0;
style.WindowRounding = 0;
style.ScrollbarRounding = 0;
style.TabRounding = 0;
style.ItemSpacing = ImVec2(4,2);
style.ItemInnerSpacing = ImVec2(0,0);
style.GrabMinSize = 8;
style.GrabRounding = 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.