How to get the color index that the user selected in the palette?

Hello, SfImageEditor has the DefaultSelectedColorIndex parameter that sets or gets the default color index in the palette.
How to get the color index that the user selected in the palette?

3 Replies

RS Ramya Soundar Rajan Syncfusion Team July 14, 2020 02:31 PM UTC

 
Greetings from Syncfusion. 
 
Query 1: SfImageEditor has the DefaultSelectedColorIndex parameter that sets or gets the default color index in the palette. 
 
We would like to let you know that DefaultSelectedColorIndex property is used to change the default selected color in color palette. Currently we can’t get the selected index in color palette using this property. 
  
Query 2: How to get the color index that the user selected in the palette? 
  
In our current implementation, we were unable to get the selected color index in the color palette. We would like to suggest that you can get the selected text or shape color by using the ItemSelected event and you can get the settings of each selected shapes and text using the ItemSelected argument. Please refer the help document below for more information. 
 
 
Regards, 
Ramya S 



AB Andrey Bogatov July 14, 2020 11:19 PM UTC

Hello, thanks, but this event does not work when choosing a pencil.  Pencil is the main tool.
Are there any other options?


RS Ramya Soundar Rajan Syncfusion Team July 15, 2020 12:47 PM UTC

Hi Andrey Bogatov, 
 
We would like to inform you that the ItemSelected event didn’t fire when drawing path on an image. Currently we don’t have any other option to get the selected color or index when using pencil. 
 
Regards, 
Ramya S 


Loader.
Up arrow icon