Set bookmark color works only with some colors

WebViewer Version: 10.3.0

setting bookmark color is not working correctly, some colors get set correctly but the majority is not.

Correct behavior:
await pdfnetBookmark.setColor(255, 0, 0); // set the book mark color to style="color: rgb(255, 0, 0);

Wrong behavior
but any other rgb combination is wrongly set:
await pdfnetBookmark.setColor(255, 50, 50); // set the bookmark color to style="color: rgb(255, 255, 255);

await pdfnetBookmark.setFlags(2); // doesn’t set bookmark font to bold?

Hello Senussi,

Thank you for reaching out, can you provide a sample application demonstrating your issue and what youre trying to accomplish? Thank you.

@tgordon

Thanks for reply,

I’m trying to re construct bookmarks from saved json from DB.

  1. first step is create Pdfnet Bookmark:
const pdfnetBookmark = await instance.Core.PDFNet.Bookmark.create(pdfDoc, outlineBookmark.name);
await pdfnetBookmark.setFlags(outlineBookmark.flags); // to set font bold, but doesn't work either
await pdfnetBookmark.setColor(outlineBookmark.r, outlineBookmark.g, outlineBookmark.b);

second step is to add that created bookmarks to pdfDoc

let pdfDoc = await _documentViewer.getDocument().getPDFDoc();
pdfDoc.addRootBookmark(pdfnetBookmark).then();

the problem:
setColor works only with some colors like setColor(255,0,0) this sets the bookmark style correctly to rgb(255,0,0)
But when setColor(100, 50, 100) that sets bookmark style to style=“color: rgb(255, 255, 255);”
which is completely a wrong color as shown in attachments.
bookmark_wrong_colors