# How can i get current Color of the selected text whenever text selected changed?

**URL:** <https://pdfjs.community/t/how-can-i-get-current-color-of-the-selected-text-whenever-text-selected-changed/805>\
**Category:** Technical Support\
**Tags:** pdfjs-express\
**Created:** [June 2, 2021, 6:15am UTC](https://pdfjs.community/t/how-can-i-get-current-color-of-the-selected-text-whenever-text-selected-changed/805 "2021-06-02T06:15:11Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![toufiqul](https://avatars.discourse-cdn.com/v4/letter/t/ecd19e/32.png) [@toufiqul](https://pdfjs.community/u/toufiqul)\
**Post date:** [June 2, 2021, 6:15am UTC](https://pdfjs.community/t/how-can-i-get-current-color-of-the-selected-text-whenever-text-selected-changed/805/1 "2021-06-02T06:15:11Z")

</div>

I want get the color of current selected text

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex031/uploads/pdfjscommunity/original/1X/ffbcd25c7d423db8d5acd5db201c272f4db306dd.png) [@system](https://pdfjs.community/u/system)\
**Post date:** [June 2, 2021, 6:15am UTC](https://pdfjs.community/t/how-can-i-get-current-color-of-the-selected-text-whenever-text-selected-changed/805/2 "2021-06-02T06:15:14Z")

</div>

**Hello, I’m Ron, an automated tech support bot 🤖**

While you wait for one of our customer support representatives to get back to you, please check out some of these documentation pages:

Guides:
- [Real-time collaboration client](https://pdfjs.express/documentation/collaboration/realtime-collaboration-client)
- [Customize annotation tools - Extend built in tools](https://pdfjs.express/documentation/annotation/customizing-tools#extend-built-in-tools)
- [Creating custom annotations for your viewer - Adding the annotation to a document](https://pdfjs.express/documentation/annotation/custom-annotations#adding-the-annotation-to-a-document)

APIs:
- [CoreControls.DocumentViewer - textSelected](https://pdfjs.express/api/CoreControls.DocumentViewer.html#event:textSelected__anchor)
- [CoreControls.EditBoxManager - editorTextChanged](https://pdfjs.express/api/CoreControls.EditBoxManager.html#event:editorTextChanged__anchor)
- [CoreControls.AnnotationManager - getNumberOfGroups()](https://pdfjs.express/api/CoreControls.AnnotationManager.html#getNumberOfGroups__anchor)

Forums:
- [Annotation Icons does not change color as selected](https://pdfjs.community/t/annotation-icons-does-not-change-color-as-selected/177/1)
- [How to customize the text selection tooltip](https://pdfjs.community/t/how-to-customize-the-text-selection-tooltip/622/3)
- [Is it possible to get annotation color from Annotation object](https://pdfjs.community/t/is-it-possible-to-get-annotation-color-from-annotation-object/302/1)

---

<div class="post-metadata">

**Author:** ![Logan](https://yyz1.discourse-cdn.com/flex031/user_avatar/pdfjs.community/logan/32/13_2.png) [@Logan](https://pdfjs.community/u/Logan)\
**Post date:** [June 8, 2021, 3:40pm UTC](https://pdfjs.community/t/how-can-i-get-current-color-of-the-selected-text-whenever-text-selected-changed/805/3 "2021-06-08T15:40:10Z")

</div>

Hi there!

Unfortunately this is actually a very complex problem and a use case that we do not support.

Sorry about that,

Thanks,  
Logan
