Rules Hub
Code Ruleset
Rule priority, scope & exceptions
Use this to align rules with the senior-level structure (P0/P1/P2, scope, exceptions/tradeoffs).
Name custom color tokens using a canonical color-naming reference
Name primitive palette colors consistently with the existing token system, keeping semantic role tokens distinct.
Bad example
| 1 | $palette: ( |
| 2 | pink-red: #fd0014, |
| 3 | some-grey: #4f4f4f, |
| 4 | ); |
Explanation (EN)
An ad-hoc primitive name can duplicate an existing palette entry or break its naming convention.
Objašnjenje (HR)
Good example
| 1 | // Derived from a canonical color-naming tool (e.g. Name That Color) |
| 2 | $palette: ( |
| 3 | torch-red: #fd0014, |
| 4 | matterhorn: #4f4f4f, |
| 5 | ); |
Explanation (EN)
Objašnjenje (HR)
Notes (EN)
Follow the existing palette's naming and scale convention when adding a primitive color, and map it to semantic roles at the appropriate token layer.
Exceptions / Tradeoffs (EN)
An external color-naming tool is optional and can conflict with numeric scales or established brand names. Semantic tokens should describe their role rather than a sampled color name.