Skip to content

Commit

Permalink
feat: increase color saturation
Browse files Browse the repository at this point in the history
  • Loading branch information
nonzzz committed Jan 26, 2025
1 parent 17a5acd commit 425b40e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions src/primitives/decorator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,9 @@ function evaluateColorMappings(data: NativeModule[]): ColorMappings {
return hash % 360
}

const lightScale = (depth: number) => 70 - depth * 5
const baseSaturation = 40
const siblingHueShift = 20
const lightScale = (depth: number) => 60 - depth * 5
const baseSaturation = 70
const siblingHueShift = 30

const rc = 0.2126
const gc = 0.7152
Expand Down Expand Up @@ -114,8 +114,8 @@ function evaluateColorMappings(data: NativeModule[]): ColorMappings {
const luminance = calculateLuminance(r, g, b)

if (luminance < 0.6) {
hslColor.l += 0.2
} else if (luminance > 0.8) {
hslColor.l += 0.15
} else if (luminance > 0.65) {
hslColor.l -= 0.1
}

Expand Down
2 changes: 1 addition & 1 deletion src/primitives/event.ts
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ export class TreemapEvent extends DOMEvent {
treemap.highlight.setZIndexForHighlight()
treemap.fontCache.flush(treemap, this.matrix)
this.state.isWheeling = true
const easedProgress = easing.cubicIn(progress)
const easedProgress = easing.cubicInOut(progress)
const scale = (targetScaleRatio - this.matrix.a) * easedProgress
this.matrix.a += scale
this.matrix.d += scale
Expand Down

0 comments on commit 425b40e

Please sign in to comment.