Drawing filled rectangle?

I must be overlooking something stupidly simple - I need to render a plain 2d filled rectangle to a canvas as a temporary image until I decide on a sprite.

I’ve been searching for solutions but I’m finding ten different ways to do this and many of them are way more effort than just making a solid rectangular sprite.

Part of why I want a dynamic rectangle is because it’s for a “health”-style meter, I’ll show a percentage of an inner rectangle and I’m not sure I can do that with sprites.

EDIT: Filled Images will work for the sprite part.

You can indeed, and yes, a solid rectangular sprite is the easiest way to do this.

When you want to show just a percentage of it, you’ll show it in an Image of type Filled, with the fill method probably set to Horizontal or Vertical. Here’s an example of vertical fill.

I typically have a bunch of textures in a project that are just 1x1 single colours. You can make them in paint easily.

I use these anytime I need an image or texture place holder.