feat(editor): improve html content color mapping (#15516)

fix #15514

#### PR Dependency Tree


* **PR #15516** 👈

This tree was auto-generated by
[Charcoal](https://github.com/danerwilliams/charcoal)

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **Bug Fixes**
  * Improved color handling when importing HTML content.
* Added support for hex, RGB/RGBA, percentage, alpha, transparent,
named, and HSL color values.
  * Correctly maps supported colors to the app’s color themes.
* Prevents invalid, translucent, or unsuitable colors from being
applied.
  * Preserves style values containing additional colons during import.
* Improved imported text formatting for supported and unsupported
colors.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
DarkSky
2026-08-24 10:52:02 +08:00
committed by GitHub
parent cd6593c659
commit 8e8a781ed1
4 changed files with 125 additions and 105 deletions
+1
View File
@@ -2795,6 +2795,7 @@ __metadata:
"@blocksuite/affine-shared": "workspace:*"
"@blocksuite/std": "workspace:*"
"@blocksuite/store": "workspace:*"
"@ctrl/tinycolor": "npm:^4.1.0"
"@toeverything/theme": "npm:^1.1.23"
"@types/hast": "npm:^3.0.4"
collapse-white-space: "npm:^2.1.0"