Skip to content

fix(xlsx): match native theme tint colors - #1398

Merged
developer0hye merged 1 commit into
mainfrom
fix/issue-1394-excel-theme-tint
Aug 29, 2026
Merged

fix(xlsx): match native theme tint colors#1398
developer0hye merged 1 commit into
mainfrom
fix/issue-1394-excel-theme-tint

Conversation

@developer0hye

Copy link
Copy Markdown
Owner

Summary

  • use the corrected Excel-compatible theme-tint calculation now merged into the patched umya-spreadsheet v2 branch
  • add an application-level regression that resolves the fixture's accent-2 tint="0.7999" fill to native Excel's #F8EFF0
  • add fresh 150-DPI GT/before/after evidence for the affected page

The dependency fix uses Excel's 240-step integer HLS quantization instead of a floating-point 255-step transform. It is backported in developer0hye/umya-spreadsheet#9 and proposed upstream in MathNya/umya-spreadsheet#360.

Related issue

Related: #1394

Testing

  • cargo test -p office2pdf test_positive_theme_tint_matches_native_excel_hls_quantization
  • cargo fmt --all -- --check
  • cargo clippy --workspace --all-targets -- -D warnings
  • cargo test --workspace
  • wasm-pack build crates/office2pdf --target web --features wasm
  • (cd crates/office2pdf && TMPDIR=/Volumes/T7/office2pdf-wasm-1394.R5NDo2 wasm-pack test --node --features wasm) — 10 passed
  • TMPDIR=/Volumes/T7/office2pdf-wasm-1394.R5NDo2 wasm-pack build crates/office2pdf --target web --features wasm-cjk-font
  • (cd crates/office2pdf && TMPDIR=/Volumes/T7/office2pdf-wasm-1394.R5NDo2 wasm-pack test --node --features wasm-cjk-font) — 11 passed
  • python3 scripts/compare_layout.py <native-Excel-page-1.pdf> <office2pdf-after.pdf> --page 1 --noise-floor 0.5 --audit — 12 matched text blocks, 0 missing/extra/rewrapped, no shift over 5pt
  • python3 scripts/compare_render.py <native-Excel-page-1.pdf> <office2pdf-after.pdf> --page 1 --dpi 150 --audit — histogram intersection 0.9980, colour shift 0.0001, no material axis difference
  • inspected full pages, 5% pixel diff, and matched body/footer/right-edge crops directly at 150 DPI
  • vector-path audit: all 42 pale body-fill paths changed from #F8F0F1 to native Excel's #F8EFF0

Visual impact

  • No rendered PDF change
  • Rendered PDF change or visual evidence added
  • Reason: The page-1 pale body panel now uses the same theme-tint colour as native Excel.

Visual audit

Visual comparison

GT Before After
GT Before After

Required inspection

  • Rendered all evidence at 150 DPI or higher
  • Stored progressive JPEG quality 86 assets with metadata stripped
  • Used Codex/Claude vision to inspect the full GT/output pages, diff, and matched crops
  • Inspected matched region crops at full resolution
  • Ran compare_layout.py --audit and dispositioned every large text-instance shift
  • Ran the 5% fuzz pixel-difference sweep
  • Inventoried hairlines and border dash styles
  • Inventoried font weight, italic, and underline emphasis

Deviation audit

Check Result
Page count/order Matches GT for the audited Start sheet page; the workbook output remains in source sheet order.
Element presence Matches GT; all page-1 content remains present.
Position/size Remaining: #1210 — the leading footer run still takes the ambient size and shifts its line box.
Rotation/flip No deviation observed; page 1 contains no independently rotated or flipped content.
Fill Remaining: #1397 — all 42 tinted body paths are fixed to #F8EFF0, while one header T-junction retains a one-pixel raster seam.
Stroke/border Matches GT; no intentional hairline or dashed-border mismatch was found on page 1.
Shape outline geometry Remaining: #1397 — header outer bounds match, but its same-colour regions remain segmented at one T-junction.
Text content Matches GT; title, body, note, and footer text are unchanged.
Font family/weight/style Remaining: #1210 — the footer Normal-font size remains unresolved; title/body and the bold Note emphasis match, with no italic or underline runs.
Text color Remaining: #1210 — the leading footer run still falls back to black instead of the Normal font's theme colour.
Alignment Matches GT; page-1 title, body rows, note, and footer keep their alignment.
Line/paragraph spacing Remaining: #1210 — the footer's unresolved Normal-font size still affects its line box.
Clipping/overflow Matches GT; no new clipping or overflow appears.

Checklist

  • Commits include a Signed-off-by line
  • PR scope contains one root cause
  • Remaining visual deviations each reference an open issue

Signed-off-by: Yonghye Kwon <developer.0hye@gmail.com>
@developer0hye
developer0hye merged commit 5dac7e6 into main Aug 29, 2026
18 checks passed
@developer0hye
developer0hye deleted the fix/issue-1394-excel-theme-tint branch August 29, 2026 23:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant