> For the complete documentation index, see [llms.txt](https://docs.flatredball.com/gum/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.flatredball.com/gum/gum-tool/tutorials-and-examples/examples/silhouette-solid-colored-sprite.md).

# Silhouette (Solid Colored Sprite)

## Introduction

Render targets and blend modes can be combined to create a silhouette of any shape. This example uses a Sprite with transparency. It uses the Bear.png file:

<figure><img src="https://2695663588-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M_fzQmxQ1VeUFHcoo2c%2Fuploads%2Fgit-blob-3d80c1d6d7987d23a81897fe3a9ca1da99648c3e%2FBear.png?alt=media" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
As of October 2026 Gum supports `Sprite` `Color Operations` for creating silhouettes. This page is kept as an alternate way to creat esilhouettes, but the easiest is to use the [Silhouette Color Operation](/gum/gum-tool/gum-elements/general-properties/color.md#silhouette-color--texture-alpha).
{% endhint %}

## Creating a Silhouette Component

To create a Component that can display a Silhouette, first create a new component named SilhouetteSprite.

Add a ColoredRectangle instance and a Sprite instance. The order matters - the Sprite should be drawn on top of the ColoredRectangle (it should show up 2nd in the Project tree view).

<figure><img src="https://2695663588-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M_fzQmxQ1VeUFHcoo2c%2Fuploads%2Fgit-blob-2ce3a37618df538f158c3dbeef53585cf57ed93a%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

For this example, we will use the Alignment tab to adjust each item:

* SilhouetteSprite (main component) - Dock Size to Children
* ColoredRectangleInstance - Dock Fill

The Sprite should already be sized according to its source file, although you can change this size if desired.

The ColoredRectangleInstance defines the color of the silhouette so change it to a desired color.

Your component should look similar to the following image:

<figure><img src="https://2695663588-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M_fzQmxQ1VeUFHcoo2c%2Fuploads%2Fgit-blob-fbf357795fd9dd0e5e7dd9e7eded422d292a37dd%2F29_22%2010%2026.png?alt=media" alt=""><figcaption><p>SilhouetteSprite initial setup</p></figcaption></figure>

Next we'll adjust the transparency values. To do this:

1. Set SilhouetteSprite `Is Render Target` to `true`
2. Set SpriteInstance `Blend` to `MinAlpha`

Your sprite's silhouette should now appear, using the underlying color as its own color.

<figure><img src="https://2695663588-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M_fzQmxQ1VeUFHcoo2c%2Fuploads%2Fgit-blob-f87bc0bfc77f723475439ccb2f1779cc0ccf866c%2F29_22%2012%2037.png?alt=media" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.flatredball.com/gum/gum-tool/tutorials-and-examples/examples/silhouette-solid-colored-sprite.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
