[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-112893":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":9,"language":10,"languages":9,"totalLinesOfCode":9,"stars":11,"forks":12,"watchers":13,"openIssues":14,"contributorsCount":14,"subscribersCount":14,"size":14,"stars1d":15,"stars7d":12,"stars30d":16,"stars90d":14,"forks30d":14,"starsTrendScore":17,"compositeScore":18,"rankGlobal":9,"rankLanguage":9,"license":9,"archived":19,"fork":19,"defaultBranch":20,"hasWiki":21,"hasPages":19,"topics":22,"createdAt":9,"pushedAt":23,"updatedAt":24,"readmeContent":25,"aiSummary":26,"trendingCount":14,"starSnapshotCount":14,"syncStatus":27,"lastSyncTime":28,"discoverSource":29},112893,"language-guided-lut","Leipengpeng\u002Flanguage-guided-lut","Leipengpeng","Turn text color directions into reusable 3D LUTs for original-resolution photos.",null,"Python",68,6,59,0,1,8,4,45.34,false,"main",true,[],"2026-11-12 05:52:52","2026-11-23 09:45:56","# Language-Guided LUT\n\nLanguage-Guided LUT turns a written color direction or a voice transcript into a reusable 3D LUT. An image editor creates a color reference from a small JPEG. The local fitter estimates a global RGB transform from that reference and applies the exported LUT to the original-resolution photo. It also exports XMP presets and profiles for Lightroom and Photoshop Camera Raw.\n\n用一句话描述想要的调色。系统先从小图生成颜色参考，再导出 3D LUT，最后在本地套回原尺寸照片。也支持双图追色，以及导出 Lightroom 和 Photoshop Camera Raw 的 XMP 预设与配置文件。\n\n[Color grading Skill](skills\u002Fcolor-match-lut\u002FSKILL.md) · [豆包与 Lightroom 实机用法](skills\u002Fcolor-match-lut\u002Freferences\u002Fdoubao-workflow.md) · [Backends and setup](skills\u002Fcolor-match-lut\u002Freferences\u002Fbenchmark.md) · [Algorithms](skills\u002Fcolor-match-lut\u002Freferences\u002Falgorithms.md)\n\n## First use in the agent\n\nAttach the photo you want to grade and describe the look you want. A style name or one specific change is enough. For a film, director, photographer or broad look, the agent researches and selects a reference. You can add a strength or something to preserve, or supply your own reference if you have one.\n\n> 把这张照片调成清透日系。阴影稍微偏青，力度轻一点，保留自然肤色和原来的曝光。\n\n> Give this photo a clean, airy look. Make the shadows slightly cyan and keep the original exposure and natural skin tones.\n\nWhen you first invoke the skill without a complete request, the agent shows an example like this and asks for the missing photo or color direction.\n\nBefore generating a color reference, the agent checks the local Python environment and the host's file, search and image-editing tools. If a required capability or dependency is missing, it stops and tells you what to configure. You can then ask it to set up the environment and resume.\n\n## Use in Doubao Work\n\n1. From a Git checkout, build a ZIP containing only the color grading Skill. You can also select the unpacked skill folder in Doubao.\n\n   ~~~sh\n   git archive --format=zip --output=language-guided-lut.zip HEAD:skills color-match-lut\n   ~~~\n\n2. Open **插件 · 技能 · 工作台** → **技能** → **添加** → **上传技能**. Select the ZIP, then choose **在对话中使用** on the installed Skill. Use a signed-in Doubao Work session that has access to the photo, a local Python environment and image editing.\n3. Attach the original photo and describe the style in one sentence. For example, 「把这张照片调成《末代皇帝》的感觉。自己找剧照参考，给我原尺寸成片、LUT 和 XMP。」 For a film look, the agent searches and selects references before grading. You can request Bing Images and ask it to report the search provider it actually used.\n4. Check the delivered PNG against the original dimensions. The .cube contains the LUT. To apply the editable XMP in Lightroom Classic, open the original, import the XMP from the Develop Presets panel, apply the preset, and use **Before\u002FAfter** to compare.\n\nDoubao uses Microsoft Bing Images by default. If a requested Google search fails, it switches to Bing. If Bing is also unavailable, it tries the host's built-in search, accessible Chinese search providers, or official galleries and reports the actual source used.\n\nThe [Doubao and Lightroom walkthrough](skills\u002Fcolor-match-lut\u002Freferences\u002Fdoubao-workflow.md) covers first-use guidance, search fallback and output verification. The [environment guide](skills\u002Fcolor-match-lut\u002Freferences\u002Fenvironment_setup.md) explains missing dependencies, domestic mirrors and offline setup.\n\n## Recommended input\n\n**Starting from a camera RAW?** Develop it in your RAW editor, then export a **full-resolution 16-bit SDR PNG in sRGB** and attach that PNG to the Skill. The Skill also accepts 8-bit PNG and JPEG. The final LUT render keeps the input dimensions after EXIF orientation and writes a 16-bit PNG when the input is 16-bit. Text-guided grading uses a separate small JPEG for the image editor.\n\n**如果原片是相机 RAW，建议先在 RAW 编辑器中完成基础显影，再导出原尺寸、16 位、SDR、sRGB 的 PNG 交给 Skill。** 也兼容 8 位 PNG 和 JPEG。16 位 PNG 的本地 LUT 套用会输出原尺寸 16 位 PNG。\n\n## Setup\n\nRun these examples from the repository root with Python 3.11 or later. The core uses NumPy, Pillow, SciPy and PyPNG. Use sRGB for 16-bit PNG input, or install Little CMS 2 for other embedded ICC profiles.\n\nCheck an existing environment before installing packages. Exit code 0 means the selected local checks passed. Exit code 2 lists missing packages or Skill files. The host's image-editing and search tools are checked separately by the agent.\n\n~~~sh\npython skills\u002Fcolor-match-lut\u002Fscripts\u002Fcheck_environment.py --guide --xmp\n~~~\n\nIf dependencies are missing, install them in the Python environment selected for grading, then run the check again.\n\n~~~sh\npython -m pip install -r requirements.txt\n~~~\n\n境外 PyPI 不可达时，优先使用国内镜像。下面的源设置只作用于本条安装命令。完全离线时使用[离线包安装方法](skills\u002Fcolor-match-lut\u002Freferences\u002Fenvironment_setup.md#国内镜像与离线安装)。\n\n~~~sh\npython -m pip install -r requirements.txt --index-url https:\u002F\u002Fpypi.tuna.tsinghua.edu.cn\u002Fsimple --timeout 20 --retries 1\n~~~\n\nFor Codex, install the [skills\u002Fcolor-match-lut](skills\u002Fcolor-match-lut) folder as a skill. For standalone grading, use the Python entry points below.\n\n## Start with words\n\nUse a single-image prompt for concrete changes such as “lift the shadows” or “keep the skin tones natural and make the highlights warmer.” For a vague look or named inspiration, the agent starts with reference research.\n\n1. Prepare a small JPEG and an image-editing prompt. The default long edge is 1080 pixels.\n\n   ~~~sh\n   python skills\u002Fcolor-match-lut\u002Fscripts\u002Ftext_style_lut.py prepare --content input.png --style-text \"Warm highlights and cool cyan shadows, with natural skin\" --output out\u002Ftext\n   ~~~\n\n   Open the [offline prompt tool](skills\u002Fcolor-match-lut\u002Fassets\u002Fcolor_prompt_tool.html) locally or use the [rewriting guide](skills\u002Fcolor-match-lut\u002Freferences\u002Fcolor_prompt_rewriter.md). Pass a UTF-8 prompt file with \u003Ccode>--image-prompt-file\u003C\u002Fcode> to use your own reviewed wording.\n\n2. Give \u003Ccode>out\u002Ftext\u002Fupload.jpg\u003C\u002Fcode> and \u003Ccode>out\u002Ftext\u002Fprompt.txt\u003C\u002Fcode> to an image-editing host. Save its returned color reference as \u003Ccode>styled.png\u003C\u002Fcode>. In Codex, the skill can use the built-in Image editor. Review the reference for composition, lighting and local recoloring before fitting.\n\n3. Fit and export the LUT. With \u003Ccode>--apply\u003C\u002Fcode>, the script reloads the exported cube and renders the original photo locally.\n\n   ~~~sh\n   python skills\u002Fcolor-match-lut\u002Fscripts\u002Ftext_style_lut.py finish --job out\u002Ftext\u002Fjob.json --styled styled.png --apply\n   ~~~\n\n   The default finish uses MKL\u002FOklab. With \u003Ccode>--method auto --backend-root local-backends\u003C\u002Fcode>, reference pixels select the route. Color uses the optional ColorFM-L backend. Near-neutral black and white uses MKL\u002FOklab with equal RGB output channels. [ColorFM-L setup](skills\u002Fcolor-match-lut\u002Freferences\u002Fbenchmark.md#colorfm-l).\n\n## Automatic reference-guided grading\n\nAttach the original photo and name a film, a director, or a look, such as “Give this photo an old Hong Kong cinema look.” The agent searches publicly available images, verifies sources, and filters out posters, portraits of creators, and repeated frames. It identifies recurring palettes across the eligible examples, then selects a frame in the same palette group with lighting and subject matter closest to the original. A night street photo gets priority for night street references. A sunny portrait gets priority for sunny portraits.\n\nThe selected frame supplies color evidence. The image editor receives a small JPEG of the original and a globally graded copy of that same photo as the second image. It follows the source photo’s composition, subjects and lighting. The skill fits the returned reference locally, renders the original at full resolution, and exports a 3D LUT and an editable Normal XMP.\n\nThe [search and selection guide](skills\u002Fcolor-match-lut\u002Freferences\u002Fstyle_reference_search.md) defines the ranking and evidence record. The [reference-guided workflow](skills\u002Fcolor-match-lut\u002Freferences\u002Fimage_reference_providers.md) covers the local guide, ordered image inputs, and fallback when a host lacks image search or multi-image editing.\n\n**给原片和一句风格描述即可。** 例如「调成《末代皇帝》的感觉」或「有点老港片的感觉」。Agent 自行搜索并筛选样张，先找出现最多的配色，再在同组里优先选和原片同光照、同题材的画面。网页样张提供配色依据，Image 使用原片小图和同图引导。结果包含原尺寸 PNG、LUT、可编辑 XMP 和样张来源。\n\n## Start with a reference photo\n\n~~~sh\npython skills\u002Fcolor-match-lut\u002Fscripts\u002Fcolor_match_lut.py fit --content input.png --style reference.jpg --output out\u002Freference --apply\npython skills\u002Fcolor-match-lut\u002Fscripts\u002Fcolor_match_lut.py apply --lut out\u002Freference\u002Fbures\u002Flook.cube --content another.jpg --output out\u002Fapply\n~~~\n\nThe [skill](skills\u002Fcolor-match-lut\u002FSKILL.md) and [benchmark guide](skills\u002Fcolor-match-lut\u002Freferences\u002Fbenchmark.md) cover shared LUT fitting, one-to-many and many-to-one review galleries, six comparison backends, and optional local CLIP pairing.\n\n## Export Lightroom and Camera Raw XMP\n\nGenerate editable presets from an existing LUT and the original photo it was fitted for. The fitter uses RAWmakase's measured curve and mixer responses in this example. Color presets fit point curves and eight-band HSL in three combinations. Black-and-white presets fit a master curve, with or without a B&W mix.\n\n~~~sh\npython skills\u002Fcolor-match-lut\u002Fscripts\u002Flut_to_xmp.py --content input.png --lut out\u002Freference\u002Fbures\u002Flook.cube --output out\u002Fxmp --name \"My Look\" --engine rawmakase\n~~~\n\nThe output includes editable \u003Ccode>.xmp\u003C\u002Fcode> files, local previews, and a fit report. Import the XMP files into Lightroom Classic's Presets panel. In Photoshop Camera Raw, put the XMP files in a ZIP and use **Import Profiles & Presets**. Local previews approximate the Adobe controls. Actual Adobe rendering can differ.\n\nTo use the 3D transform as a **Creative Profile** with a single amount control, export a separate XMP profile. The default grid is up to 32³.\n\n~~~sh\npython skills\u002Fcolor-match-lut\u002Fscripts\u002Flut_to_xmp_profile.py --lut out\u002Freference\u002Fbures\u002Flook.cube --output out\u002Fmy_look_profile.xmp --name \"My Look\"\n~~~\n\n## Output and verification\n\n- The default LUT is a 65³ \u003Ccode>.cube\u003C\u002Fcode> for full-range encoded sRGB. The renderer uses trilinear interpolation in RGB space.\n- A global LUT gives the same output to the same input RGB anywhere in the frame. The renderer keeps the original pixel grid after EXIF orientation and writes a separate sRGB PNG. Color changes, clipping and quantization can make the RGB transform irreversible.\n- Run reports record image hashes, the selected route, and LUT-to-PNG checks. The image-editing host handles the small reference. Fitting, LUT export and full-resolution rendering run locally.\n\n## Attribution\n\nOptional learned backends use separate upstream source trees and checkpoints. Obtain them from the sources and under the terms listed in the [benchmark guide](skills\u002Fcolor-match-lut\u002Freferences\u002Fbenchmark.md). The [upstream Apache-2.0 text](skills\u002Fcolor-match-lut\u002Freferences\u002Fcolorfm\u002FColorFM-APACHE-2.0.txt) accompanies the ColorFM compatibility patch.\n\n- [Linear Monge–Kantorovitch color mapping](https:\u002F\u002Fdoi.org\u002F10.1049\u002Fcp:20070055)\n- [Oklab](https:\u002F\u002Fbottosson.github.io\u002Fposts\u002Foklab\u002F)\n- [ColorFM](https:\u002F\u002Fgithub.com\u002Fcszn\u002FColorFM)\n- [RAWmakase](https:\u002F\u002Fgithub.com\u002Fpch\u002Frawmakase) and [Photo Room](https:\u002F\u002Fgithub.com\u002FHiemenz\u002Fphoto-room). The XMP response implementations retain their upstream licenses and source attribution.\n","这是一个将自然语言描述的调色指令自动转换为可复用3D LUT（查找表）的工具，用于对原始分辨率照片进行精准色彩校正与风格化处理。核心功能包括：基于用户提供的小尺寸参考图或文本\u002F语音指令生成颜色参考，拟合全局RGB变换，输出标准.cube格式3D LUT，并同步导出兼容Lightroom和Photoshop Camera Raw的XMP预设与配置文件；支持双图追色、强度调节及肤色\u002F曝光等关键属性保留。适用于摄影后期、AI图像编辑工作流、自动化调色插件集成等场景。",2,"2026-11-24 04:44:31","CREATED_QUERY"]