{ e.stopPropagation(); if (!showPicker) placePicker(e.currentTarget as HTMLElement); showPicker = !showPicker; }} title={gradientColors.length > 1 ? 'Gradient Color' : 'Text Color'} style="width: 20px; height: 20px; padding: 0;" >
{#if showPicker}
e.stopPropagation()} >
{#each gradientColors as color, index (index)}
setActiveSlot(index)} title="Color {index + 1} - Click to select this color slot" > {#if gradientColors.length > 1}
{ e.stopPropagation(); removeGradientColor(index); }} onkeydown={(e) => { if (e.key === 'Enter' || e.key === ' ') { e.preventDefault(); e.stopPropagation(); removeGradientColor(index); } }} title="Remove this color" role="button" tabindex="0">×
{/if}
{/each} {#if gradientColors.length < 3}
+
{/if}
{#if gradientColors.length > 1}
{/if}
Classic Colors
{#each classicColors as color (color)}
selectColor(color)} title={color} >
{/each}
Full Palette
{#each colors256 as color (color)}
selectColor(color)} title={color} >
{/each}
{/if}