fix: hex8 regression #10578 (#10773)

This commit is contained in:
zsviczian
2026-02-12 22:03:13 +01:00
committed by GitHub
parent a70417f23f
commit 8b3e149db6
2 changed files with 3 additions and 4 deletions
+1 -1
View File
@@ -346,7 +346,7 @@ export const normalizeInputColor = (color: string): string | null => {
if (tc.isValid()) {
// testing for `#` first fixes a bug on Electron (more specfically, an
// Obsidian popout window), where a hex color without `#` is considered valid
if (tc.getFormat() === "hex" && !color.startsWith("#")) {
if (["hex", "hex8"].includes(tc.getFormat()) && !color.startsWith("#")) {
return `#${color}`;
}
return color;