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.
Description
Find supplied palette role aliases whose resolution enters a cycle, including aliases leading into that cycle; does not invent terminal roles.
An alias can lead into a cycle without itself being one of the cycle's repeated nodes. This audit reports all starts whose resolution cycles.
When to use this tool
Find supplied palette role aliases whose resolution enters a cycle, including aliases leading into that cycle; does not invent terminal roles.
- Prepare the supplied aliasesJson 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. 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.cyclicNames. Interpret false, null and empty lists using the distinctions below; they can be valid outputs.
Build the unique name-to-target map, resolve every declared alias name and collect those whose traversal repeats a name.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 |
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": "a"
}
]
}
] | Output field | Interpretation |
|---|---|
| result | Object containing the named outputs below. |
| result.cyclicNames | The cyclic names list in the ordering and representation described above. |
{
"input": {
"aliasesJson": "[{\"name\":\"a\",\"target\":\"b\"},{\"name\":\"b\",\"target\":\"a\"}]"
},
"output": {
"result": {
"cyclicNames": [
"a",
"b"
]
}
}
} Limitations and assumptions
- The result includes aliases feeding a cycle. It does not validate terminal colors, remove aliases or rewrite the map.
- 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 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.
- Palette Role Coverage Check
Audit explicit required palette role coverage and duplicate assignments; no contrast, accessibility or theme completeness certification.