Skip to content

Commit

Permalink
Fix medium key
Browse files Browse the repository at this point in the history
  • Loading branch information
Namide committed Apr 5, 2023
1 parent c0d7003 commit 8e8a3f5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/extract/extractor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export default (

if (_colorValidator(r, g, b, a)) {
const real = r << 16 | g << 8 | b
const medium = (r >> 4 & 0xF) << 2 | (g >> 4 & 0xF) << 1 | (b >> 4 & 0xF)
const medium = (r >> 4 & 0xF) << 8 | (g >> 4 & 0xF) << 4 | (b >> 4 & 0xF)
const small = Math.round(r * (_splitPower - 1) / 255) * (_splitPower * _splitPower) + Math.round(g * (_splitPower - 1) / 255) * _splitPower + Math.round(b * (_splitPower - 1) / 255)

const smallGroup = rootGroup.addRootGroup(small)
Expand Down

0 comments on commit 8e8a3f5

Please sign in to comment.