File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -81,7 +81,7 @@ const Self = class ColorScale extends ColorElement {
8181
8282 addButton . addEventListener ( "click" , evt => {
8383 let { name, color} = this . defaultColor ?. ( ) ?? { } ;
84- [ name , color ] = [ name ?? "New color" , color ?? this . computedColors . at ( - 1 ) ?. color ?? new Self . Color ( "#f06" ) . to ( this . space ) ] ;
84+ [ name , color ] = [ name ?? "New color" , color ?? this . computedColors . at ( - 1 ) ?. color ?? new Self . Color ( "#f06" ) ] ;
8585
8686 if ( this . colors [ name ] ) {
8787 // Name already exists
@@ -93,7 +93,7 @@ const Self = class ColorScale extends ColorElement {
9393 name = `${ name } ${ i } ` ;
9494 }
9595
96- this . colors = { ...this . colors , [ name ] : color } ;
96+ this . colors = { ...this . colors , [ name ] : color . to ( this . space ) } ;
9797 this . render ( ) ;
9898
9999 // Focus the new color input and select its content
You can’t perform that action at this time.
0 commit comments