Skip to content
Discussion options

You must be logged in to vote

Hi @balachander1964 , you can override the color via the displaCy API. You need to pass a dictionary (where each key is an entity-type with its corresponding color value) in the colors parameter.

However, there's no option to do this for the background color. You might need to use HTML/CSS templates as a workaround. The displaCy templates are made of HTML tags. You can copy what's in TPL_ENTS and TPL_ENT, then create a div that sets the background-color to something you like, Afterwards, you can pass it in the template option of the visualizer.

Replies: 4 comments 8 replies

Comment options

You must be logged in to vote
2 replies
@balachander1964
Comment options

@balachander1964
Comment options

Answer selected by balachander1964
Comment options

You must be logged in to vote
5 replies
@balachander1964
Comment options

@ljvmiranda921
Comment options

@balachander1964
Comment options

@balachander1964
Comment options

@ljvmiranda921
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@ljvmiranda921
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat / visualizers Feature: Built-in displaCy and other visualizers
2 participants