gitea/web_src/js/utils
silverwind 91dc737a35
Replace `tinycolor2` with `colord` (#36673)
[`colord`](https://github.com/omgovich/colord) is significantly smaller
than [`tinycolor2`](https://github.com/bgrins/TinyColor) (~4KB vs ~29KB
minified) and ships its own TypeScript types, removing the need for
`@types/tinycolor2`.

Behaviour is exactly the same for our use cases. By using `.alpha(1)` we
force the function to always output 6-digit hex format (it would output
8-digit for non-opaque colors).

---------

Signed-off-by: silverwind <me@silverwind.io>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 15:43:01 +00:00
..
color.test.ts Convert frontend code to typescript (#31559) 2024-07-07 15:32:30 +00:00
color.ts Replace `tinycolor2` with `colord` (#36673) 2026-02-20 15:43:01 +00:00
dom.test.ts Update JS dependencies, adjust webpack config, misc fixes (#36431) 2026-01-24 07:35:46 +00:00
dom.ts Fix markup code block layout (#36578) 2026-02-11 03:22:33 +00:00
glob.test.ts Misc typescript tweaks (#36523) 2026-02-10 05:09:56 +00:00
glob.test.txt Fix different behavior in status check pattern matching with double stars (#35474) 2025-09-13 11:53:27 +08:00
glob.ts Fix different behavior in status check pattern matching with double stars (#35474) 2025-09-13 11:53:27 +08:00
html.test.ts Improve html escape (#34911) 2025-07-01 21:44:05 +08:00
html.ts Update eslint to v9 (#35485) 2025-09-14 19:15:06 +03:00
image.test.ts Forbid localStorage access in eslint (#36461) 2026-01-27 19:59:51 +00:00
image.ts Update eslint to v9 (#35485) 2025-09-14 19:15:06 +03:00
match.test.ts Update emoji data for Unicode 16 (#36596) 2026-02-12 21:39:36 +00:00
match.ts Add `knip` linter (#36442) 2026-01-24 12:52:13 +00:00
testhelper.ts Add `elk` layout support to mermaid (#36486) 2026-02-07 02:22:57 +00:00
time.test.ts Convert frontend code to typescript (#31559) 2024-07-07 15:32:30 +00:00
time.ts Update eslint to v9 (#35485) 2025-09-14 19:15:06 +03:00
url.test.ts Enable more markdown paste features in textarea editor (#35494) 2025-09-16 23:55:57 +00:00
url.ts Enable more markdown paste features in textarea editor (#35494) 2025-09-16 23:55:57 +00:00