Palette Role Alias Resolver
Resolve an explicit palette role alias chain with path provenance and cycle evidence; an unmapped name is a terminal literal, not a verified palette entry.
Description
Resolve an explicit palette role alias chain with path provenance and cycle evidence; an unmapped name is a terminal literal, not a verified palette entry.
Palette roles may refer through aliases. A resolution path makes the final target or cycle visible.
When to use this tool
Resolve an explicit palette role alias chain with path provenance and cycle evidence; an unmapped name is a terminal literal, not a verified palette entry.
- Prepare the supplied aliasesJson, name 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 aliasesJson, name. 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.path, result.terminal, result.cycle. Interpret false, null and empty lists using the distinctions below; they can be valid outputs.
Parse aliasesJson as unique name/target records and follow exact aliases from name. Return path, terminal and cycle; a repeated alias yields null terminal and a cycle flag.1
| Input field | Meaning and representation | Accepted input |
|---|---|---|
| aliasesJson | JSON text, entered as one text field. The decoded structure is illustrated below; it is not a separate file. | Text |
| name | name. | 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": "aliasesJson",
"decoded": [
{
"name": "a",
"target": "b"
},
{
"name": "b",
"target": "c"
}
]
}
] | Output field | Interpretation |
|---|---|
| result | Object containing the named outputs below. |
| result.path | The path list in the ordering and representation described above. |
| result.terminal | The terminal value under the stated formula or text convention. |
| result.cycle | Flag for cycle under the exact condition described above. |
{
"input": {
"aliasesJson": "[{\"name\":\"a\",\"target\":\"b\"},{\"name\":\"b\",\"target\":\"c\"}]",
"name": "a"
},
"output": {
"result": {
"path": [
"a",
"b",
"c"
],
"terminal": "c",
"cycle": false
}
}
} Limitations and assumptions
- Terminal existence as a real color is not checked. Names are case-sensitive and no external palette is queried.
- 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 Role Alias Cycle Check
Find supplied palette role aliases whose resolution enters a cycle, including aliases leading into that cycle; does not invent terminal roles.
- Palette Role Coverage Check
Audit explicit required palette role coverage and duplicate assignments; no contrast, accessibility or theme completeness certification.