ColorEdit4: Show preview colors in sliders?
Version/Branch of Dear ImGui:
Version: Dear ImGui 1.79 Branch: master
My Issue/Question:
Is there interest in expanding the color picker so it has the option to show preview colors in the RGB and/or HSV sliders?
Screenshots/Video
Use case:

Working prototype:

Standalone, minimal, complete and verifiable example: I only implemented this locally for RGB sliders. So probably would need to do something different for HSV:
IMGUI_API bool SliderScalarGradient(const char* label, ImGuiDataType data_type, void* p_data, const void* p_min, const void* p_max, const ImU32 color_start, const ImU32 color_end, const char* format = NULL, ImGuiSliderFlags flags = 0);
I made calling this new function the default behavior in my ColorEdit4, but it could be made optional by using one of the few remaining ImGuiColorEditFlags_. Feel free to close if this is something best left outside the main library.
It would probably be interesting to have this as an option, but seeing we don't have proper standardized support for sRGB/Linear the preview may be incorrect unless manually tesselated (the equivalent HSV preview would need manual tesselation either way). If you still have the code around may be nice posting.
Sure, here is a gist of the code along with some TODO items:
https://gist.github.com/jeffkdev/ea8458af09c40271b7ba5c62cc8a3a78
ADMIN added a copy: ea8458af09c40271b7ba5c62cc8a3a78-491f6d170f0f62abadd42e63e4f0867e5a1fa508.zip