mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-08 17:30:09 +02:00
[Editor] Add the possibility to change line opacity in Ink editor
This commit is contained in:
parent
45b9e8417d
commit
7831a100b3
10 changed files with 215 additions and 19 deletions
|
@ -585,6 +585,14 @@ function getRGB(color) {
|
|||
.map(x => parseInt(x));
|
||||
}
|
||||
|
||||
if (color.startsWith("rgba(")) {
|
||||
return color
|
||||
.slice(/* "rgba(".length */ 5, -1) // Strip out "rgba(" and ")".
|
||||
.split(",")
|
||||
.map(x => parseInt(x))
|
||||
.slice(0, 3);
|
||||
}
|
||||
|
||||
warn(`Not a valid color format: "${color}"`);
|
||||
return [0, 0, 0];
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue