]> source.dussan.org Git - gitea.git/commit
Always pass 6-digit hex color to monaco (#25780)
authorsilverwind <me@silverwind.io>
Sun, 9 Jul 2023 10:17:22 +0000 (12:17 +0200)
committerGitHub <noreply@github.com>
Sun, 9 Jul 2023 10:17:22 +0000 (12:17 +0200)
commit38844e0869bff0a08f8810c97cb3f5cb07df9a8e
tree17b2ee5b024a863449f18544ce0ce8274f57290d
parentd58096ec3135a9d04ce35bd3cf0a608b9c3b64de
Always pass 6-digit hex color to monaco (#25780)

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
package-lock.json
package.json
web_src/js/components/ContextPopup.vue
web_src/js/features/codeeditor.js
web_src/js/features/repo-projects.js
web_src/js/utils/color.js
web_src/js/utils/color.test.js