spaCy
spaCy copied to clipboard
Default Color in displacy
Currently there's a default background color for entities in displacy It would be nice to be able to provide with a different default color.
It seems like a pretty easy change as there's already a colors variable being passed to the function. So a potential fix can simply provide it with another variable (e.g. default_color) and if it exists, use this as the color instead of the default one.
Thanks for the suggestion! I think we'd be happy to take a PR for that.
There is a bg option when rendering POS dependencies (eg displacy.render(doc, style="dep", options={"bg":"ivory"}) but this option does not seem to be available when visualising named entities (displacy.render(doc, style="ent")).
Hi, can I work on this issue ?
Sure, we would welcome a PR!
FYI - here is some relevant help for getting start with contributing to the code base: https://github.com/explosion/spaCy/blob/master/CONTRIBUTING.md#contributing-to-the-code-base
I tried changing the background color for entities , take a look at pictures below ,
before -:
after -:
please guide i am doing the right thing , or it is something different.