https://github.com/raais/imguicandy
Color utils, Themes and other cool stuff for Dear ImGui
https://github.com/raais/imguicandy
colors dear-imgui gui imgui themes
Last synced: 2 months ago
JSON representation
Color utils, Themes and other cool stuff for Dear ImGui
- Host: GitHub
- URL: https://github.com/raais/imguicandy
- Owner: Raais
- License: mit
- Created: 2021-12-11T06:51:59.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2021-12-11T18:03:36.000Z (almost 4 years ago)
- Last Synced: 2025-05-04T22:37:35.182Z (5 months ago)
- Topics: colors, dear-imgui, gui, imgui, themes
- Language: C++
- Homepage:
- Size: 30.3 KB
- Stars: 64
- Watchers: 1
- Forks: 7
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ImguiCandy
Color utils, Themes and other cool stuff for [Dear ImGui](https://github.com/ocornut/imgui)
## Usage
```cpp
#include "candy.h"
```
## Utils
These functions are to be used inside a loop, hence the use of static/global variables.
```cpp
ImVec4 Rainbow(double &static_ratio, double step = 0.01);ImVec4 Gradient2(ImVec4 col1, ImVec4 col2, double &static_ratio, double step = 0.01);
ImVec4 Gradient3(ImVec4 col1, ImVec4 col2, ImVec4 col3, double &static_ratio, double step = 0.01);
```
#### Example
```cpp
//Rainbow
static double s0 = 0.0;
ImGui::PushStyleColor(ImGuiCol_Button, ImCandy::Rainbow(s0));
```

```cpp
//Gradient2
static double s1 = 0.0;
ImGui::PushStyleColor(ImGuiCol_WindowBg, ImCandy::Gradient2(IV4_VIOLET, IV4_BUBBLEGUM, s1));
```

## Themes
- Blender Dark [Improvised]
```cpp
ImCandy::Theme_Blender();
```

- Cyberpunk Neon [Improvised]
```cpp
ImCandy::Theme_Cyberpunk();
```

- Nord/Nordic GTK [Improvised]
```cpp
ImCandy::Theme_Nord();
```

## Contribute
Submit your own themes by opening an [issue](https://github.com/Raais/ImguiCandy/issues) or [pull request](https://github.com/Raais/ImguiCandy/pulls).