Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
typescript
coloration
Commits
7ee6faea
Commit
7ee6faea
authored
May 02, 2020
by
Zéfling
🎨
Browse files
fix calculation alpha with mask opacity
parent
5e0e3481
Changes
1
Hide whitespace changes
Inline
Side-by-side
projects/coloration/src/lib/coloration.ts
View file @
7ee6faea
...
...
@@ -134,7 +134,7 @@ export class Coloration {
const
B
=
baseColor
.
intColor
&
0x0000FF
;
if
(
additionalColor
.
alpha
)
{
this
.
calcColor
.
alpha
=
this
.
minmax
(
baseColor
.
alpha
+
additionalColor
.
alpha
,
0
,
1
);
this
.
calcColor
.
alpha
=
this
.
minmax
(
baseColor
.
alpha
+
additionalColor
.
alpha
*
opacity
,
0
,
1
);
}
this
.
calcColor
.
intColor
=
this
.
rgbToInt
(
Math
.
round
(((
additionalColor
.
intColor
>>
16
)
-
R
)
*
lum
)
+
R
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment