Palette Channel Order Transcoder
Transcode explicit RGBA byte channel order using a complete RGBA permutation; no color transforms or endian interpretation.
Description
Transcode explicit RGBA byte channel order using a complete RGBA permutation; no color transforms or endian interpretation.
Packed color consumers can expect different channel orders even when the source palette is RGBA.
When to use this tool
Transcode explicit RGBA byte channel order using a complete RGBA permutation; no color transforms or endian interpretation.
- Prepare the supplied paletteJson, order fields for this operation.
- Compare the complete example with the representation used by your own input before carrying the result into another step.
How to use the tool and how it works
- Enter paletteJson, order. Use the exact text syntax, units and index conventions explained below.
- Run the tool. If input validation fails, correct the supplied fields before interpreting any result.
- Read result.rows. Interpret false, null and empty lists using the distinctions below; they can be valid outputs.
Require order to be a four-character permutation of uppercase RGBA. Reorder each entry's channel bytes accordingly and return its ID with the channel list.1
| Input field | Meaning and representation | Accepted input |
|---|---|---|
| paletteJson | JSON text, entered as one text field. The decoded structure is illustrated below; it is not a separate file. | Text |
| order | order. | Text; at most 8,192 UTF-16 code units, subject to the grammar above |
For the JSON text fields, the following decoded structures show the example records before they are serialized into input strings. Keep field names, list nesting and value types as shown.
[
{
"field": "paletteJson",
"decoded": [
{
"id": "a",
"name": "Red",
"rgba": [
255,
0,
0,
255
]
},
{
"id": "b",
"name": "red",
"rgba": [
255,
0,
0,
0
]
}
]
}
] | Output field | Interpretation |
|---|---|
| result | Object containing the named outputs below. |
| result.rows | The rows list in the ordering and representation described above. |
{
"input": {
"paletteJson": "[{\"id\":\"a\",\"name\":\"Red\",\"rgba\":[255,0,0,255]},{\"id\":\"b\",\"name\":\"red\",\"rgba\":[255,0,0,0]}]",
"order": "BGRA"
},
"output": {
"result": {
"rows": [
{
"id": "a",
"channels": [
0,
0,
255,
255
]
},
{
"id": "b",
"channels": [
0,
0,
255,
0
]
}
]
}
}
} Limitations and assumptions
- This changes field order only, without alpha conversion, color-space transformation or byte-buffer serialization.
- Palette records contain string id/name and exactly four RGBA bytes from zero through 255; at most 128 records are accepted. Duplicate IDs or names remain allowed unless this operation explicitly audits or rejects them.
- Every declared top-level field is required and unexpected fields are rejected. Numeric inputs must be finite; ordinary text fields are bounded to 8,192 UTF-16 code units, with tighter operation-specific limits where stated.
- Lists are limited to 128 entries. JSON text must meet bounded size and depth checks, and numeric outputs beyond the safe finite magnitude are rejected. Exact large integers use decimal strings.
- Indexes are zero-based and spans have an exclusive end unless explicitly stated otherwise. A valid false, null or empty-list result is distinct from malformed input.
Alternative or Complementary methods
Use actual rendering or a color-managed workflow when comparing perceived color and transparency. Index changes need corresponding updates to their consumers; name and role checks do not establish visual accessibility.
References
Similar or alternative tools
- Palette Channel Minmax Table
Report observed per-channel RGBA byte extrema, using null for an empty palette rather than invented bounds.
- Palette Channel Quantization Collision Table
Audit RGB collisions after truncating each byte to a supplied high-bit precision; alpha is explicitly excluded.