Skip to content

Instantly share code, notes, and snippets.

@moebiussurfing
Created July 31, 2019 00:17
Show Gist options
  • Save moebiussurfing/5022713b88a6233fdc6494f9f1836443 to your computer and use it in GitHub Desktop.
Save moebiussurfing/5022713b88a6233fdc6494f9f1836443 to your computer and use it in GitHub Desktop.
ImGui color picker
static ImVec4 color;
color.x = color_backGround.get().r;
color.y = color_backGround.get().g;
color.z = color_backGround.get().b;
color.w = color_backGround.get().a;
// squared box
ImGuiColorEditFlags colorEdiFlags =
ImGuiColorEditFlags_NoSmallPreview |
ImGuiColorEditFlags_NoTooltip |
ImGuiColorEditFlags_NoLabel |
ImGuiColorEditFlags_NoSidePreview |
ImGuiColorEditFlags_NoInputs |
ImGuiColorEditFlags_NoAlpha |
ImGuiColorEditFlags_PickerHueBar;
ImGui::ColorPicker4("Background Color", (float *) &color, colorEdiFlags);
// ImGui::ColorPicker4("Background Color", color_backGround.get(), colorEdiFlags);
color_backGround = color;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment