Highlights
The injection token configuring the five preview highlight categories — company, geo, person, extract locations, match locations — and how to override their colors.
HIGHLIGHTS configures the colors the document preview uses to highlight five categories of text — entities
the engine extracted, and the terms that matched the query. It ships with defaults and can be overridden
per-application.
Options
Prop
Type
Recipes
Overriding one highlight's colors
HIGHLIGHTS's default factory returns all five; a provide override replaces the whole array, so keep every
entry you are not changing.
Recoloring match locations
import type { ApplicationConfig } from "@angular/core";
import { HIGHLIGHTS } from "@sinequa/atomic-angular";
export const appConfig: ApplicationConfig = {
providers: [
{
provide: HIGHLIGHTS,
useValue: [
{ name: "company", color: "white", bgColor: "#FF7675" },
{ name: "geo", color: "white", bgColor: "#74B9FF" },
{ name: "person", color: "white", bgColor: "#00ABB5" },
{ name: "extractslocations", color: "black", bgColor: "#fffacd" },
// Only this one actually changes.
{ name: "matchlocations", color: "black", bgColor: "#ffd700" },
],
},
],
};