ForHosting KIT · Images

RGB555 to RGB Unpacker

Turn a packed RGB555 number into ordinary RGB: 0x7C1F gives red 255, green 0 and blue 255. Each five-bit level is scaled to the full 0 to 255 range, so retro graphics and device dumps become readable colors. Free in your browser.

  • Free
  • Runs in your browser
  • No sign-up
  • Your data stays on your device
Use it from WebAPIEmailTelegramApp soon
If you enter
Value
0x7C1F
You get
Value
31,775
Hex
0x7C1F
Red
255
Green
0

The RGB555 to RGB unpacker converts one unsigned 15-bit packed color into separate red, green, and blue values suitable for modern 8-bit color workflows. It accepts either ordinary decimal text or hexadecimal text beginning with 0x, validates the complete input, extracts the three five-bit fields, and scales each field to the range from 0 through 255. The result also preserves the decoded five-bit components and a normalized hexadecimal representation, making the conversion easy to inspect, compare, test, or integrate into a data-processing pipeline.

Understand the RGB555 bit layout

RGB555 stores three color channels inside fifteen significant bits. In this unpacker, bits 14 through 10 hold red, bits 9 through 5 hold green, and bits 4 through 0 hold blue. Each field can therefore represent an integer from 0 through 31.

The accepted packed value is unsigned and must remain between 0 and 32767, inclusive; a sixteenth high bit is not treated as transparency, intensity, or padding. You may provide the value as decimal text, such as 31775, or as hexadecimal text with an explicit 0x prefix, such as 0x7C1F. The output includes a normalized four-digit hexadecimal form so that results are straightforward to compare with memory dumps and file-format documentation.

It also reports each original five-bit component alongside its expanded eight-bit channel. This makes the operation transparent: you can see both the exact stored field and the approximate display-oriented value derived from it, without needing to perform shifts or masks manually.

See how five bits become eight bits

After extraction, every five-bit component is scaled across the full eight-bit range with the formula round(component multiplied by 255 divided by 31). A stored component of 0 therefore becomes 0, and a stored component of 31 becomes 255. Intermediate values are distributed deterministically across the available output range.

This is a numerical expansion, not restoration of color information that was absent from the packed source: RGB555 has only 32 levels per channel, so several possible eight-bit values can never be produced. The rounding rule is stated explicitly because converters sometimes use a left shift, which maps the maximum component to 248, or bit replication, which describes the same intent through bit operations.

Validate packed colors in practical workflows

Use the unpacker when examining retro graphics, embedded display data, texture assets, binary records, emulator state, or any interchange format that identifies its colors as RGB555 with red in the most significant five-bit field. The distinction matters because related layouts such as BGR555 reverse channel positions, while RGB565 assigns six bits to green; those formats require different decoding and should not be silently guessed. Malformed text, signs, fractions, missing 0x prefixes on hexadecimal digits, trailing characters, and values outside the 15-bit unsigned range are rejected instead of being partially parsed.

That strictness prevents a value such as 123abc from quietly becoming 123. Because the algorithm uses no network, random source, clock, locale-sensitive parsing, or mutable state, identical valid input produces identical output in every supported execution channel.

Inspect retro game colors

Convert packed palette entries into familiar 8-bit channels while retaining the original five-bit components for debugging.

Validate embedded display data

Check RGB555 register or buffer values and reject records that exceed the unsigned 15-bit range.

Prepare decoded color records

Turn hexadecimal or decimal packed values into named numeric fields for tests, migrations, or analysis pipelines.

What bit order does this unpacker use?

Red occupies bits 14–10, green occupies bits 9–5, and blue occupies bits 4–0.

How are five-bit channels expanded?

Each component is calculated as round(component × 255 ÷ 31), producing an integer from 0 through 255.

Can I enter a hexadecimal value?

Yes. Use a 0x prefix, for example 0x7C1F. Hexadecimal digits without that prefix are rejected.

Does it accept RGB565 or BGR555?

No. Those layouts assign or order bits differently. This capability decodes only the documented RGB555 layout.

What happens to bit 15?

Values above 0x7FFF are rejected. The capability does not interpret an extra high bit as alpha or another flag.

Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.

POSThttps://api.kit.forhosting.com/color/rgb555-rgb

Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.

curl -X POST https://api.kit.forhosting.com/color/rgb555-rgb \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"value":"0x7C1F"}'
{
  "value": "0x7C1F"
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "color.rgb555_rgb",
  "status": "queued",
  "_links": {
    "result": "/tasks/tsk_…/result"
  }
}

The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.

Per request$0.002

Published price — no tokens, no invented credits. A failed task is never charged.

HTTPCodeMeaning
401unauthorizedMissing or invalid API key.
402insufficient_balanceYour balance doesn't cover the task price.
404unknown_typeThat task type doesn't exist.
429rate_limitedToo many requests. Use the webhook instead of polling.

See how five bits become eight bits

The original red_5bit, green_5bit, and blue_5bit fields remain in the response, so callers can verify the masks or apply a different expansion policy downstream when a legacy specification requires one.

Validate packed colors in practical workflows

For automated jobs, submit one value per request and consume the named numeric fields directly. The API base price is $0.002 per request, while the same deterministic calculation can run in the browser.

Read the full KIT documentation →