Decision Input
Schema
༶ model: string
The decision model identifier determines both:
- the type of value produced by decision.
- the decision model used to produce it, and the required input parameters
All decision models named color-set/*
produce a Decision<ColorSet>
and expose the resolved
ColorSet
value, which contains a set of ColorValue
s, their individual
color components, and - when declared - tokens and token references.
The specific color-set/anchored decision model determines
how the color scale is generated. In this case, the model starts with an anchor
color and
applies a modifier
to create a number of color steps
in either/both directions: up
and down
.
See Reference: Decision Models for the full list of decision types, their resulting values and available models, and respective parameters.
༶ name: string
(non unique)
The decision name is mandatory.
The decision name can be used to create relationships between decisions.
The same decision name can be declared more than once, as long as
- the decision is scoped to different
contexts
each time. - the decision type is always the same
༶ id: string
(optional) (unique)
When provided it can also be used to retrieve decision values and to create relationships between decisions.
By referencing the record’s uuid
, instead of the decision name
, you can link
a decision to a specific record regardless of applicable context.
༶ description: string
(optional)
Provide a small description for the decision.
༶ usage: object
(optional)
These guidelines inform the intent of the decision, namely to what they should be applied.
༶ contexts: string[] | {all: string[], some?: string[]}
(optional)
Contexts inform where, when or to whom a certain design decision is applicable.
The decision value will exist only when at least one of these contexts is present.
Alternatively, a list of required contexts can be provided via an object:
all: string[]
- The decision will only be in effect when all these contexts are present.
some?: string[]
- When provided, at least one of these contexts must also be present.
༶ params: object
(optional)
The shape of the parameters of each each decision is driven by the decision model.
As an example, the color-set/anchored decision model requires as input:
- a starting color (here provided as a reference to another decision)
- a modifier object with
SignedPercentage
values forh
- Hues
- Saturationl
- Lightness
- a number that specifies the total number of steps of the set
In turn, the color-set/explicit decision model, requires only a single parameter: the explicit list of colors (or references) in the set.
As another example, the color-value/explicit
The color value can be specified in a number of formats, according to the 🚧 schema.
As well as a decision (or token) reference.
See Decision Models Reference for each model’s input parameter.
🚧🚧🚧
༶ tokenize: object
(optional)
Declare tokens generated from this decision.