Palette Role Coverage Check

Audit explicit required palette role coverage and duplicate assignments; no contrast, accessibility or theme completeness certification.

Description

Audit explicit required palette role coverage and duplicate assignments; no contrast, accessibility or theme completeness certification.

Required palette roles can be missing while observed roles can also be duplicated. These are separate coverage issues.

When to use this tool

Audit explicit required palette role coverage and duplicate assignments; no contrast, accessibility or theme completeness certification.

  • Prepare the supplied required, roles 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

  1. Enter required, roles. Use the exact text syntax, units and index conventions explained below.
  2. Run the tool. If input validation fails, correct the supplied fields before interpreting any result.
  3. Read result.missing, result.duplicates. Interpret false, null and empty lists using the distinctions below; they can be valid outputs.

Require unique required role strings. Return required values absent from roles and duplicate observed roles with their zero-based positions.1

Input fieldMeaning and representationAccepted input
requiredrequired.List of strings; at most 128 entries
rolesroles.List of strings; at most 128 entries
Output fieldInterpretation
resultObject containing the named outputs below.
result.missingThe missing list in the ordering and representation described above.
result.duplicatesThe duplicates list in the ordering and representation described above.
json
{
  "input": {
    "required": [
      "foreground",
      "background"
    ],
    "roles": [
      "foreground",
      "foreground"
    ]
  },
  "output": {
    "result": {
      "missing": [
        "background"
      ],
      "duplicates": [
        {
          "key": "foreground",
          "indexes": [
            0,
            1
          ]
        }
      ]
    }
  }
}

Limitations and assumptions

  • Equality is literal and case-sensitive. No color, contrast or accessibility requirement is inferred from role names.
  • 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

  1. Tool behavior and example: Palette Role Coverage Check — tool.io

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 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.

Don't forget to set a bookmark for tool.io!
Privacy | Imprint | Cookies