Description
Generate distinct sRGB hex colors separated by a caller threshold in OKLab after each existing full-severity protan/deutan/tritan simulation, with a finite attempt limit and no individual accessibility guarantee.
Procedural artwork expresses a visual idea through coordinates, repeated motifs, colors, or explicit placement constraints. A coordinate plan can be checked and reproduced before rendering, while physical material behavior and fabrication require separate information.
Generate distinct sRGB hex colors separated by a caller threshold in OKLab after each existing full-severity protan/deutan/tritan simulation, with a finite attempt limit and no individual accessibility guarantee.
When to use this tool
Use this generator to create reproducible color vision deficiency palette cases from the supplied model or bank. Inspect the returned evidence before using cases in a test or exercise.
How to use the tool and how it works
- Supply count, minimumDistance, maximumAttempts in the field shapes below. Set seed when you need an explicit replay.
- Run the tool and correct any input error. For generated controls, distinguish a successful fixture containing an invalid case from failure to generate the fixture.
- Read colors, pairDistances, minimumPairDistance, attempts. Use the conventions below. Keep answer-bearing fields separate when presenting an exercise.
Draw distinct RGB candidates, simulate protan, deutan, and tritan views, and convert each simulated view to Oklab. Accept a candidate only when its minimum Euclidean distance to every accepted color across all three simulations meets minimumDistance.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| count | Count | Required. Safe integer; minimum 2; maximum 32. |
| minimumDistance | Minimum Distance | Required. Finite number; minimum 0. |
| maximumAttempts | Maximum Attempts | Required. Safe integer; minimum 2; maximum 8192. |
| seed | Optional numeric seed; takes precedence over context randomness. Without either, use the fixed tool.io default seed. | Optional. Safe integer. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| colors | Colors | Required. Array of Text; minimum UTF-16 length 7; maximum UTF-16 length 7.; minimum items 2; maximum items 32. |
| pairDistances | Pair Distances | Required. Array of Array of Finite number; minimum 0.; minimum items 2; maximum items 32.; minimum items 2; maximum items 32. |
| minimumPairDistance | Minimum Pair Distance | Required. Finite number; minimum 0. |
| attempts | Attempts | Required. Safe integer; minimum 2; maximum 8192. |
| randomness | Replay source and normalized 32-bit seed, or null seed for an advancing context source. | Required. Object; no unknown keys. |
| randomness.seed | Optional safe-integer replay seed; normalization and precedence are explained below. | Required. Safe integer. or Null. |
| randomness.source | Source | Required. Text; one of "context", "seed". |
An explicit safe-integer seed takes precedence over injected context randomness and is normalized to an unsigned 32-bit integer. With no seed and no context source, replay uses the fixed tool.io default seed. A context source must return finite values from zero inclusive to one exclusive; its advancing state must be retained separately. randomness records the source and normalized seed, or null for context. These generators are not cryptographic random sources.
{
"input": {
"count": 3,
"minimumDistance": 0.08,
"maximumAttempts": 256,
"seed": 42
},
"output": {
"colors": [
"#99E1EF",
"#72C32B",
"#DA3B32"
],
"pairDistances": [
[
0,
0.1304929930087915,
0.29617685717787195
],
[
0.1304929930087915,
0,
0.13717839825762446
],
[
0.29617685717787195,
0.13717839825762446,
0
]
],
"minimumPairDistance": 0.1304929930087915,
"attempts": 3,
"randomness": {
"seed": 42,
"source": "seed"
}
}
} Limitations and assumptions
- Simulation is an approximation, not a vision assessment or a guarantee for every observer. Pair distances concern the simulated metric, not contrast against a background; finite attempt limits can exhaust the search.
- A replay requires the same complete input and implementation. The stated sampling convention applies within its eligible space. A finite draw does not exhaust all possible outputs; repeats remain possible unless a distinct-selection rule is explicit.
- The field tables state structural bounds; cross-field constraints and bounded search or output budgets also apply. Unknown keys are rejected where the object contract disallows them. Input errors are distinct from null fields and deliberate invalid controls in a successful output.
Alternative or Complementary methods
For a supplied example, inspect the returned construction or delegated check directly. To evaluate a consumer, also test cases chosen for its own boundaries; a generated finite corpus does not establish exhaustive coverage.
References
Similar or alternative tools
- Random Categorical Color Palette Generator
Assign generated distinct hex colors to distinct supplied category labels under a caller OKLab distance threshold and finite attempt limit; assignments preserve category order and do not imply universal distinguishability.
- Random Color Wheel Generator
Generate an HSL wheel with a random hue offset, explicit saturation/lightness, annular sector geometry and portable SVG; unlike a hue palette, the output defines a complete circular layout.