Repository navigation
fix(converter): rotation3d presets, perspective 0, HSL lumMod - #634
Open
ShotaroKataoka wants to merge 2 commits into
Open
ShotaroKataoka wants to merge 2 commits into
ShotaroKataoka wants to merge 2 commits into
Conversation
ShotaroKataoka
force-pushed
the
fix/rotation3d-and-lummod
branch
from
November 14, 2026 11:06
9007f94 to
e217f54
Compare
apply_transforms truncated each channel, so 4F81BD at lumMod 75% came out 366092 instead of PowerPoint's 376092. Now that every transformed color goes through it, rounding there fixes them all (at most 1 per channel). The CHANGELOG no longer claims every color element: table borders and text of a theme table style still ignore transforms. The docstring says which paths pass satMod. SPEC: 20261114-2000_pr-trio-takeover Progress: #634 R5 R6 R7 Next: #629
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes the three converter bugs that #617 marked
xfail(strict=True)and removes the markers. Closes #631, closes #632, closes #633.Changes
perspectiveBelow/perspectiveContrastingLeftFacing/perspectiveContrastingRightFacing. It is now the inverse of the builder'sROTATION3D_PRESETS, so the two cannot drift again.perspective: 0as anorthographicFrontcamera withoutfov. The importer now reads anorthographicFrontcamera that carries a non-zero rotation asperspective: 0. A bevel-only scene (orthographic camera, no rotation) still imports withoutrotation3d.converter/color.pyhad the transform math twice (_resolve_color_with_transforms,apply_element_transforms) andxml_helpers._apply_srgb_transformsa third, RGB-space variant used by gradient stops onsrgbClrand bysysClr. There is now oneapply_transforms(hex, {name: val})(shade / tint in linear gamma, lumMod / lumOff on HSL luminance, then satMod); the other three call it.apply_transformsrounds each channel instead of truncating it, so4F81BDat lumMod 75% is PowerPoint's376092(it was366092). This applies to every transformed color, which can move by 1 per channel.table.pyresolve_fill) droppedlumMod/lumOffand mixedtint/shadein sRGB with their own helpers. They now go through_resolve_color_with_transforms;_apply_tint/_apply_shadeare removed (no other callers).ROTATION3D_PRESETS; new cases for a gradient stop and asysClrwith lumMod, and a theme table style fill withschemeClr+ lumMod; the lumMod 75% case is checked exactly (376092).[Unreleased]→ Fixed.Testing
uv run pytest tests/test_effects_roundtrip.py tests/test_converter_fill_line.py tests/test_converter_robustness.py tests/test_element_roundtrip.py tests/test_converter_elements.py tests/test_pptx_import.py tests/test_roundtrip.py tests/test_html_template.py tests/test_chart_roundtrip.py tests/test_converter_structure.py→ 439 passed, 4 xfailed (the 4 are unrelated element round-trip losses)uv run ruff check sdpm/cleantest_html_assemble.py::test_svg_icon_is_inlined_with_prefixed_ids, which fails the same way onmainin a full run, andtest_checkout_update.py::test_sigint_during_prepare_rolls_back_and_exits_130. Both pass alone.Notes
sysClrcolors withlumMod/lumOffcome out a few units different (closer to PowerPoint), and every transformed color can move by 1 per channel from the rounding; theme table style fills withlumMod/lumOffnow apply them, and theirtint/shadematch every other color element (linear gamma). For an srgbClr gradient stop with several transforms, they are now applied in the same order as for schemeClr (shade, tint, lum, sat). Re-importing an existing deck can therefore shift these colors slightly; decks built from JSON are unchanged.apply_color_transforms(exported fromsdpm.engine.converter, no internal callers, its own lumMod+tint heuristic) and table border / table textschemeClr, which still ignore child transforms. Separate follow-ups if wanted.🤖 Created by Kiro Crew