Photo kit command
select.colorRange
Color Range…
Selects pixels of a color range (a sampled color, highlights, midtones, shadows, skin tones) with fuzziness.
- Kit
- Photo 0.1.0 (PSD, PSB, or .kphoto)
- Changes the document
- no
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
backgroundColor | string | no | The background color the command uses, "#rrggbb", for this call only; the current background color by default. |
coalesce | string | no | Merges consecutive edits with the same key into one undo step, as a slider drag or a typing session is one. |
color | string | no | like #rrggbb; default foreground |
colors | string[] | no | |
foregroundColor | string | no | The foreground color the command uses, "#rrggbb", for this call only; the current foreground color by default. |
fuzziness | integer | no | 0 to 200; tones: 0..100 %=20 |
invert | boolean | no | |
localized | boolean | no | |
mode | "replace" | "add" | "subtract" | "intersect" | no | |
order | ("+" | "-")[] | no | click order of points and subtractPoints; default all points first |
points | number[][] | no | eyedropper samples |
range | integer | no | 0 to 100; % of the longer side |
sampleAllLayers | boolean | no | |
select | "sampledColors" | "reds" | "yellows" | "greens" | "cyans" | "blues" | "magentas" | "highlights" | "midtones" | "shadows" | "outOfGamut" | no | |
subtractPoints | number[][] | no | minus eyedropper |
tonalRange | any | no | level|[lo,hi] (shadows 65, highlights 190, midtones [105,150]); shadows 65, highlights 190, midtones [105,150] |
Call through photo_run
text
photo_run {
"path": "<file>.psd",
"steps": [{ "command": "select.colorRange" }]
}The required parameters, with placeholders for their types: not a tested example. Optional: backgroundColor, coalesce, color, colors, foregroundColor, fuzziness, invert, localized, mode, order, points, range, sampleAllLayers, select, subtractPoints, tonalRange. photo_run answers the step’s result in completed[i].result.
Result
| Name | Type | Required | Description |
|---|---|---|---|
selected | boolean | no |
Result JSON Schema
json
{
"additionalProperties": true,
"properties": {
"selected": {
"type": "boolean"
}
},
"type": "object"
}Parameter schema
json
{
"additionalProperties": false,
"properties": {
"backgroundColor": {
"description": "The background color the command uses, \"#rrggbb\", for this call only; the current background color by default.",
"type": "string"
},
"coalesce": {
"description": "Merges consecutive edits with the same key into one undo step, as a slider drag or a typing session is one.",
"type": "string"
},
"color": {
"description": "like #rrggbb; default foreground",
"type": "string"
},
"colors": {
"items": {
"description": "like #rrggbb",
"type": "string"
},
"type": "array"
},
"foregroundColor": {
"description": "The foreground color the command uses, \"#rrggbb\", for this call only; the current foreground color by default.",
"type": "string"
},
"fuzziness": {
"default": 40,
"description": "0 to 200; tones: 0..100 %=20",
"type": "integer"
},
"invert": {
"default": false,
"type": "boolean"
},
"localized": {
"default": false,
"type": "boolean"
},
"mode": {
"default": "replace",
"enum": [
"replace",
"add",
"subtract",
"intersect"
],
"type": "string"
},
"order": {
"description": "click order of points and subtractPoints; default all points first",
"items": {
"enum": [
"+",
"-"
],
"type": "string"
},
"type": "array"
},
"points": {
"description": "eyedropper samples",
"items": {
"items": {
"type": "number"
},
"type": "array"
},
"type": "array"
},
"range": {
"default": 100,
"description": "0 to 100; % of the longer side",
"type": "integer"
},
"sampleAllLayers": {
"default": true,
"type": "boolean"
},
"select": {
"default": "sampledColors",
"enum": [
"sampledColors",
"reds",
"yellows",
"greens",
"cyans",
"blues",
"magentas",
"highlights",
"midtones",
"shadows",
"outOfGamut"
],
"type": "string"
},
"subtractPoints": {
"description": "minus eyedropper",
"items": {
"items": {
"type": "number"
},
"type": "array"
},
"type": "array"
},
"tonalRange": {
"description": "level|[lo,hi] (shadows 65, highlights 190, midtones [105,150]); shadows 65, highlights 190, midtones [105,150]"
}
},
"type": "object"
}Generated from the command list of @kition/[email protected] and the kit itself (photo_commands through @kition/[email protected], built from KitionAI/kition-photo@abe3f30). As data: commands.jsonl.