Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
coloration
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
typescript
coloration
Commits
7ee6faea
Commit
7ee6faea
authored
May 02, 2020
by
Zéfling
🎨
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix calculation alpha with mask opacity
parent
5e0e3481
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
projects/coloration/src/lib/coloration.ts
projects/coloration/src/lib/coloration.ts
+1
-1
No files found.
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