Files
SnapOtter/apps/docs/ja/tools/image/duotone.md
T
SnapOtterandGitHub 4963ab3bbd feat(docs-i18n): translate all documentation into 20 languages
All 181 docs markdown files translated into 20 languages (apps/docs/<locale>/**). Companion to the i18n code PR; admin-merged because the file count exceeds GitHub's per-PR CI trigger limit. Validated by pnpm i18n:check (all surfaces, 0 stale/missing) and a clean all-locale docs build.
2026-07-11 13:52:47 +08:00

2.2 KiB

description, i18n_source_hash, i18n_provenance, i18n_output_hash
description i18n_source_hash i18n_provenance i18n_output_hash
カスタムのシャドウ色とハイライト色による2色のデュオトーン効果を適用します。 ab99c4f0152c human b0ff7676e5de

デュオトーン

画像に2色のデュオトーン効果を適用します。画像はグレースケールに変換され、シャドウ色(暗いトーン)とハイライト色(明るいトーン)の間のグラデーションにマッピングされます。

API エンドポイント

POST /api/v1/tools/image/duotone

画像ファイルとJSONの settings フィールドを含むmultipartフォームデータを受け付けます。

パラメータ

パラメータ 必須 デフォルト 説明
shadow string いいえ "#1e3a8a" シャドウの16進数カラー(暗いトーンに適用)
highlight string いいえ "#fbbf24" ハイライトの16進数カラー(明るいトーンに適用)
intensity integer いいえ 100 効果の強度(0〜100)。0は元の画像を返し、100はデュオトーンをフルに適用します

リクエスト例

curl -X POST http://localhost:1349/api/v1/tools/image/duotone \
  -H "Authorization: Bearer si_your-api-key" \
  -F "file=@photo.jpg" \
  -F 'settings={"shadow": "#0f172a", "highlight": "#f97316", "intensity": 80}'

レスポンス例

{
  "jobId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "downloadUrl": "/api/v1/download/a1b2c3d4-e5f6-7890-abcd-ef1234567890/photo.jpg",
  "originalSize": 2450000,
  "processedSize": 1870000
}

補足

  • 出力形式は入力形式に一致します。HEIC、RAW、PSD、SVG の入力は処理前に自動でデコードされます。
  • intensity が100未満の場合、デュオトーン結果を元の画像とブレンドし、より控えめな効果を得られます。
  • 人気のデュオトーンの組み合わせには、ネイビー/ゴールド、ティール/コーラル、パープル/ピンクがあります。