Vector kit command
recolor.randomize
Randomize Colors
Answers a recolour map with the rows' new colours shuffled or their saturation and brightness randomised (seeded), without changing the document; pass it to recolor.apply.
- Kit
- Vector 0.1.0 (.kvector)
- Changes the document
- no
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
group | string | no | read by the command beside its listed parameters |
limitTo | string | no | read by the command beside its listed parameters |
map | object[] | object | no | |
method | string | no | read by the command beside its listed parameters |
order | boolean | no | shuffle the new colours among the rows that aren't excluded |
rename | string | no | read by the command beside its listed parameters |
saturationBrightness | boolean | no | random saturation and brightness, hue kept |
seed | integer | no |
Call through vector_run
text
vector_run {
"path": "<file>.kvector",
"steps": [{ "command": "recolor.randomize" }]
}The required parameters, with placeholders for their types: not a tested example. Optional: group, limitTo, map, method, order, rename, saturationBrightness, seed. vector_run answers the step’s result in completed[i].result.
Result
| Name | Type | Required | Description |
|---|---|---|---|
map | any | no |
Result JSON Schema
json
{
"additionalProperties": true,
"properties": {
"map": {}
},
"type": "object"
}Parameter schema
json
{
"additionalProperties": false,
"properties": {
"group": {
"description": "read by the command beside its listed parameters",
"type": "string"
},
"limitTo": {
"description": "read by the command beside its listed parameters",
"type": "string"
},
"map": {
"oneOf": [
{
"items": {
"additionalProperties": true,
"type": "object"
},
"type": "array"
},
{
"additionalProperties": true,
"type": "object"
}
]
},
"method": {
"description": "read by the command beside its listed parameters",
"type": "string"
},
"order": {
"default": true,
"description": "shuffle the new colours among the rows that aren't excluded",
"type": "boolean"
},
"rename": {
"description": "read by the command beside its listed parameters",
"type": "string"
},
"saturationBrightness": {
"default": false,
"description": "random saturation and brightness, hue kept",
"type": "boolean"
},
"seed": {
"default": 0,
"type": "integer"
}
},
"returns": "{map: the rows with their new colours as keys}",
"type": "object"
}Generated from the command list of @kition/[email protected] and the kit itself (vector_commands through @kition/[email protected], built from KitionAI/kition-vector@7cf908f). As data: commands.jsonl.