MCPcopy Index your code
hub / github.com/anomalyco/opencode / tint

Function tint

packages/opencode/src/cli/cmd/run/theme.ts:167–173  ·  view source on GitHub ↗
(base: RGBA, overlay: RGBA, value: number)

Source from the content-addressed store, hash-verified

165}
166
167function tint(base: RGBA, overlay: RGBA, value: number): RGBA {
168 return RGBA.fromInts(
169 Math.round((base.r + (overlay.r - base.r) * value) * 255),
170 Math.round((base.g + (overlay.g - base.g) * value) * 255),
171 Math.round((base.b + (overlay.b - base.b) * value) * 255),
172 )
173}
174
175function blend(color: RGBA, bg: RGBA): RGBA {
176 if (color.a >= 1) {

Callers 5

splashShadowFunction · 0.70
grayFunction · 0.70
generateSystemFunction · 0.70
mapFunction · 0.70
theme.tsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected