feat(studio): letters filled with a gradient or a pattern

This commit is contained in:
Maurice
2026-10-24 09:25:28 +02:00
parent 1487ad97f1
commit d17bd47a85
14 changed files with 255 additions and 60 deletions
+1 -1
View File
@@ -28,7 +28,7 @@ export function withAlpha(hex: string, alpha = 1): string {
return `rgba(${(n >> 16) & 255}, ${(n >> 8) & 255}, ${n & 255}, ${Math.max(0, alpha)})`;
}
/** The colour the letters are filled with, or null when a photograph fills them. */
/** The colour the letters are filled with, or null when a photograph, a gradient or a pattern fills them. */
export function letterFill(el: BookTextElement): string | null {
const fill = el.fillPaint;
if (!fill) return el.color;