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

Parameters of recolor.randomize
NameTypeRequiredDescription
groupstringnoread by the command beside its listed parameters
limitTostringnoread by the command beside its listed parameters
mapobject[] | objectno
methodstringnoread by the command beside its listed parameters
orderbooleannoshuffle the new colours among the rows that aren't excluded
renamestringnoread by the command beside its listed parameters
saturationBrightnessbooleannorandom saturation and brightness, hue kept
seedintegerno

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

Result of recolor.randomize
NameTypeRequiredDescription
mapanyno
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.