Công cụ hình ảnh
Remove Background Color
remove-background-color
Use Remove Background Color through the Zavilo SDK. Check input limits, parameters, output and supported modes below.
H · HeadlessI · Interactive
Quick actions
Input files 1Output files 1
Đầu vào
Accepted input contract for this Tool.
| Kind | file |
|---|---|
| File count | 1 – 1 |
| Accepted MIME types | image/jpeg, image/png, image/webp |
Tham số
Pass these values through request.options.
| Parameter | Type | Bắt buộc | Mặc định | Giá trị / Phạm vi | Mô tả |
|---|---|---|---|---|---|
color |
string | Optional | #ffffff |
— | Solid background color as a 6-digit hex value. |
tolerance |
number | Optional | 28 |
0 – 100 | Color tolerance from 0 to 100. |
edgeConnected |
boolean | Optional | true |
— | Remove matching pixels only when connected to an outer image edge. |
Đầu ra
Result contract returned after successful processing.
| Type | files |
|---|---|
| File count | 1 – 1 |
| MIME types | image/png |
| Metadata | width, height, inputBytes, outputBytes |
| ZIP archive | No |
Ví dụ cơ bản
Choose a supported integration mode and copy the generated starter code.
Headless
const result = await client.run("remove-background-color", {
file,
options: { color: "#ffffff", tolerance: 28, edgeConnected: true }
});
console.log(result.files, result.data, result.metadata);
Interactive
await client.open({
tool: "remove-background-color",
input: { file },
options: { color: "#ffffff", tolerance: 28, edgeConnected: true },
onComplete(result) { console.log(result.files, result.data, result.metadata); }
});
Embedded
await client.mount({ tool: "remove-background-color", target: "#zavilo-tool", mode: "embedded" });
This page is generated from the SDK Tool Definition used by the runtime.