1
1
mirror of https://github.com/go-gitea/gitea synced 2025-08-10 19:48:19 +00:00

Always pass 6-digit hex color to monaco (#25780) (#25782)

Backport https://github.com/go-gitea/gitea/pull/25780, clean
cherry-pick.

Monaco can not deal with color formats other than 6-digit hex, so we
convert the colors for it via new
[`tinycolor2`](https://github.com/bgrins/TinyColor) dependency (5kB
minzipped).

Also, with the addition of the module, we can replace the existing
`hexToRGBColor` usage, I verified it is compatible with the current
tests before removing the function.

Fixes: https://github.com/go-gitea/gitea/issues/25770
This commit is contained in:
silverwind
2023-07-09 13:06:13 +02:00
committed by GitHub
parent 68a3961bf1
commit 348a6bf70d
7 changed files with 33 additions and 55 deletions

View File

@@ -42,6 +42,7 @@
"sortablejs": "1.15.0",
"swagger-ui-dist": "5.0.0",
"throttle-debounce": "5.0.0",
"tinycolor2": "1.6.0",
"tippy.js": "6.3.7",
"tributejs": "5.1.3",
"uint8-to-base64": "0.2.0",