Zgui colorpicker issues
i'm trying to add some gradients from xy0, but when i'm trying to make them into "context.window.render" functions rater then "render::" (so i can draw over stuff), i don't get the output i'm looking for...
not wanted output, but draws over stuff:

wanted output, but not drawing over stuff:

any help is greatly appreciated, ive looked over this about 10 times, and cant seem to understand why it doesn't work.
not wanted output, but draws over stuff:

Code:
void GradientH(float x, float y, float w, float h, color c1, color c2)
{
context.window.render.emplace_back(zgui::zgui_control_render_t{ {x, y}, zgui::zgui_render_type::zgui_filled_rect, c1, "", {w, h} });
BYTE first = c2.r;
BYTE second = c2.g;
BYTE third = c2.b;
for (float i = 0; i < w; i++)
{
float fi = i, fw = w;
float a = fi / fw;
/*DWORD*/float ia = a * 255;
context.window.render.emplace_back(zgui::zgui_control_render_t{ {x + i, y}, zgui::zgui_render_type::zgui_filled_rect, color(first, second, third, ia), "", {1, h} });
}
}

Code:
void GradientH(float x, float y, float w, float h, color c1, color c2)
{
render::filled_rect(x, y, w, h, c1);
BYTE first = c2.r;
BYTE second = c2.g;
BYTE third = c2.b;
for (float i = 0; i < w; i++)
{
float fi = i, fw = w;
float a = fi / fw;
/*DWORD*/float ia = a * 255;
render::filled_rect(x + i, y, 1, h, color(first, second, third, ia));
}
}