Color Count Penalty Scorer
Deduplicate independently defined palette IDs then apply caller linear extra-colour penalty; no universal colour maximum or automated visual distinction.
Description
A color-count penalty is a design policy applied to distinct palette IDs.
A color-count penalty is a design policy applied to distinct palette IDs.1
Deduplication prevents repeated occurrences of one color from being counted as extra colors.
When to use Color Count Penalty Scorer
Use this tool when you need to reproduce the stated calculation from measured records or independently selected model inputs. Establish the flag dimensions, orientation, specification, palette, or visual annotations needed for this particular calculation.
How to use Color Count Penalty Scorer and understand its results
- Establish the flag dimensions, orientation, specification, palette, or visual annotations needed for this particular calculation.
- Enter independentlyAnnotatedPaletteIds, callerPreferredMaximumDistinctColors, callerPenaltyPerExtraColor, following the field table and rules below, then run the tool.
- Read result. Use the output meanings below to interpret units, signs, flags, and any nested result fields.
- Correct reported input issues and run again. For a successful result, check the stated evidence coverage and assumptions before using it in your review.
| Input field | Meaning | Value type | Requirement |
|---|---|---|---|
| independentlyAnnotatedPaletteIds | Independently annotated palette ids | list of string | Required |
| callerPreferredMaximumDistinctColors | Caller preferred maximum distinct colors | number | Required |
| callerPenaltyPerExtraColor | Caller penalty per extra color | number | Required |
Enter a nonempty list of nonblank exact palette IDs, an integer preferred maximum from zero to 128, and a nonnegative per-extra-color penalty. Count distinct IDs, floor excess at zero, and multiply by the penalty.
extra=max(0,distinctCount−preferredMaximum); penalty=extra×penaltyPerExtra Symbols follow the input and output meanings and the calculation rules above.
| Output field | Meaning | Value type |
|---|---|---|
| result | Calculated observation or reference | object |
| result.distinctColorCount | Distinct Color Count | number |
| result.extraColorCount | Extra Color Count | number |
| result.callerPenalty | Caller Penalty | number |
{
"input": {
"independentlyAnnotatedPaletteIds": [
"red",
"red",
"white",
"blue"
],
"callerPreferredMaximumDistinctColors": 2,
"callerPenaltyPerExtraColor": 3
},
"output": {
"result": {
"distinctColorCount": 3,
"extraColorCount": 1,
"callerPenalty": 3
}
}
} Limitations and assumptions
The calculation uses supplied geometry, observations, or annotations. It does not establish an official construction specification, national identity, or universal design quality.
Missing required fields, unknown fields, wrong types, and violated calculation rules are input issues. Numeric values must be finite; nonfinite results are rejected. Evidence arrays must be dense, with no missing cells. String lists allow at most 128 strings of at most 128 characters. Extremely large composite outputs are rejected.
Alternative or Complementary methods
For a related review, use Dominant Color Area Percentage Analyzer: Dominant color area requires disjoint measured regions and a complete area denominator. Keeping unsegmented area in that denominator prevents observed colors from being treated as the whole flag. For a complementary step, use NAVA Good Flag Principle Scorer: NAVA’s five design principles provide a framework for human flag review. This calculator combines independently judged scores with your weights and explicitly records the weight of unassessed principles.
References
-
Color Count Penalty Scorer — tool.io
Similar or alternative tools
- Dominant Color Area Percentage Analyzer
Dominant color area requires disjoint measured regions and a complete area denominator. Keeping unsegmented area in that denominator prevents observed colors from being treated as the whole flag.
- NAVA Good Flag Principle Scorer
NAVA’s five design principles provide a framework for human flag review. This calculator combines independently judged scores with your weights and explicitly records the weight of unassessed principles.