* Resolve a color from a fill node (solidFill) to a hex string.
(fillNode: SafeXmlNode, ctx: RenderContext)
| 278 | * Resolve a color from a fill node (solidFill) to a hex string. |
| 279 | */ |
| 280 | function resolveColorToHex(fillNode: SafeXmlNode, ctx: RenderContext): string | undefined { |
| 281 | try { |
| 282 | const { color } = resolveColor(fillNode, ctx) |
| 283 | return color.startsWith('#') ? color : `#${color}` |
| 284 | } catch { |
| 285 | return undefined |
| 286 | } |
| 287 | } |
| 288 | |
| 289 | /** |
| 290 | * Resolve a color from a single gradient stop node (a:gs > color child) to hex + alpha. |
no test coverage detected