ComPDFKit Web SDK
    Preparing search index...

    Function setIconColor

    • Sets which palette's color the tool button icon uses ('text' | 'border' | 'fill'). Writes viewer.colorMap[toolName].iconColor ('TextColor' / 'StrokeColor' / 'FillColor'). If the tool does not have that color, warns with the available palettes and changes nothing. colorMap is keyed by tool name. Unregistered tools warn. The default UI does not color tool buttons, so only the state is stored, for Components.ToolButton showColor; the current UI does not draw it.

      Parameters

      • toolName: string

        The tool name.

      • colorPalette: "text" | "border" | "fill"

        'text', 'border' or 'fill'.

      Returns void