# Create Rectangular Colored Image from container or Script

**URL:** <https://forum.inductiveautomation.com/t/create-rectangular-colored-image-from-container-or-script/24437>\
**Category:** Ignition\
**Created:** [April 27, 2019, 9:58am UTC](https://forum.inductiveautomation.com/t/create-rectangular-colored-image-from-container-or-script/24437 "2019-04-27T09:58:03Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![juang](https://avatars.discourse-cdn.com/v4/letter/j/9dc877/32.png) [@juang](https://forum.inductiveautomation.com/u/juang)\
**Post date:** [April 27, 2019, 9:58am UTC](https://forum.inductiveautomation.com/t/create-rectangular-colored-image-from-container-or-script/24437/1 "2019-04-27T09:58:03Z")

</div>

Trying to create and Image from a container, or even from just Script. the idea is to create an image that will just have a background color, i will be getting the color from by DB. so if the user for example chooses the color red. i want to create an image with a rectangle(with red background, size 16x16) I’m using this later on in a JMenuItem to make an Icon for it. but can’t seem to find a way to create and image from scratch. Any suggestions?
