{"record":{"id":"93a8b54d5dcd6a63","repo":"framework7io/framework7","slug":"tertiarydim-color-is-undefined-prior-to-2025-spe","errorCode":null,"errorMessage":"`tertiaryDim` color is undefined prior to 2025 spec.","messagePattern":"`tertiaryDim` color is undefined prior to 2025 spec\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"src/core/shared/material-color-utils.js","lineNumber":2326,"sourceCode":"  }\n  get secondaryFixed() {\n    return this.getArgb(this.colors.secondaryFixed());\n  }\n  get secondaryFixedDim() {\n    return this.getArgb(this.colors.secondaryFixedDim());\n  }\n  get onSecondaryFixed() {\n    return this.getArgb(this.colors.onSecondaryFixed());\n  }\n  get onSecondaryFixedVariant() {\n    return this.getArgb(this.colors.onSecondaryFixedVariant());\n  }\n  get tertiary() {\n    return this.getArgb(this.colors.tertiary());\n  }\n  get tertiaryDim() {\n    const tertiaryDim = this.colors.tertiaryDim();\n    if (void 0 === tertiaryDim) throw new Error(\"`tertiaryDim` color is undefined prior to 2025 spec.\");\n    return this.getArgb(tertiaryDim);\n  }\n  get onTertiary() {\n    return this.getArgb(this.colors.onTertiary());\n  }\n  get tertiaryContainer() {\n    return this.getArgb(this.colors.tertiaryContainer());\n  }\n  get onTertiaryContainer() {\n    return this.getArgb(this.colors.onTertiaryContainer());\n  }\n  get tertiaryFixed() {\n    return this.getArgb(this.colors.tertiaryFixed());\n  }\n  get tertiaryFixedDim() {\n    return this.getArgb(this.colors.tertiaryFixedDim());\n  }\n  get onTertiaryFixed() {","sourceCodeStart":2308,"sourceCodeEnd":2344,"githubUrl":"https://github.com/framework7io/framework7/blob/655759126686766530a027b2f8f369c991d63d1c/src/core/shared/material-color-utils.js#L2308-L2344","documentation":"tertiaryDim, like the other *Dim roles, is defined only in the 2025 spec. Accessing it on a scheme built for an earlier spec yields undefined from colors.tertiaryDim() and the getter throws, rather than returning an invalid ARGB.","triggerScenarios":"Reading scheme.tertiaryDim on a DynamicScheme whose specVersion is not 2025.","commonSituations":"Mixing old scheme constructors with new role getters; theme-extraction code upgraded to reference 2025 roles while scheme creation still defaults to the 2021 spec.","solutions":["Construct the scheme with specVersion 2025.","Guard with a specVersion check and fall back to tertiary for legacy schemes.","Update the whole color pipeline consistently to the 2025 spec instead of mixing versions."],"exampleFix":"// before\nconst c = scheme.tertiaryDim; // throws on 2021 scheme\n// after\nconst scheme = new DynamicScheme({ ..., specVersion: SpecVersion.SPEC_2025 });\nconst c = scheme.tertiaryDim;","handlingStrategy":"type-guard","validationCode":"if (String(scheme.specVersion).includes('2025')) {\n  use(scheme.tertiaryDim);\n} else {\n  use(scheme.tertiary);\n}","typeGuard":"function supports2025Roles(scheme) {\n  return scheme && scheme.specVersion === '2025';\n}","tryCatchPattern":"try {\n  argb = scheme.tertiaryDim;\n} catch (err) {\n  if (err.message.includes('`tertiaryDim` color is undefined')) {\n    argb = scheme.tertiary;\n  } else throw err;\n}","preventionTips":["Keep a single util like getRole(scheme, 'tertiaryDim') that handles spec fallbacks.","Migrate scheme creation and role consumption together when adopting the 2025 spec.","Assert specVersion in tests for any code path touching *Dim roles."],"tags":["material-design","color","dynamic-scheme","spec-version"],"backgroundTag":"color-role-unsupported-spec-version","analyzedSha":"655759126686766530a027b2f8f369c991d63d1c","analyzedAt":"2026-09-02T19:48:40.711Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-10T02:17:09.455Z"}