|
|
|
@ -1197,6 +1197,20 @@ ImU32 ImGui::ColorConvertFloat4ToU32(const ImVec4& in)
|
|
|
|
|
return out;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
ImU32 ImGui::GetColorU32(ImGuiCol idx, float alpha_mul)
|
|
|
|
|
{
|
|
|
|
|
ImVec4 c = GImGui->Style.Colors[idx];
|
|
|
|
|
c.w *= GImGui->Style.Alpha * alpha_mul;
|
|
|
|
|
return ImGui::ColorConvertFloat4ToU32(c);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
ImU32 ImGui::GetColorU32(const ImVec4& col)
|
|
|
|
|
{
|
|
|
|
|
ImVec4 c = col;
|
|
|
|
|
c.w *= GImGui->Style.Alpha;
|
|
|
|
|
return ImGui::ColorConvertFloat4ToU32(c);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Convert rgb floats ([0-1],[0-1],[0-1]) to hsv floats ([0-1],[0-1],[0-1]), from Foley & van Dam p592
|
|
|
|
|
// Optimized http://lolengine.net/blog/2013/01/13/fast-rgb-to-hsv
|
|
|
|
|
void ImGui::ColorConvertRGBtoHSV(float r, float g, float b, float& out_h, float& out_s, float& out_v)
|
|
|
|
|