MCPcopy Index your code
hub / github.com/CodebuffAI/codebuff / getSheenColor

Function getSheenColor

cli/src/login/utils.ts:64–99  ·  view source on GitHub ↗
(
  char: string,
  charIndex: number,
  sheenPosition: number,
  logoColor: string,
  shadowChars: Set<string>,
  accentColor: string = '#9EFC62',
  blockColor: string = '#ffffff',
  isReversing: boolean = false,
)

Source from the content-addressed store, hash-verified

62 * @param isReversing - Whether the sheen is in the reverse (unfill) phase
63 */
64export function getSheenColor(
65 char: string,
66 charIndex: number,
67 sheenPosition: number,
68 logoColor: string,
69 shadowChars: Set<string>,
70 accentColor: string = '#9EFC62',
71 blockColor: string = '#ffffff',
72 isReversing: boolean = false,
73): string {
74 // Block characters use the specified block color
75 if (char === '█') {
76 return blockColor
77 }
78
79 // Only apply sheen to shadow/border characters
80 if (!shadowChars.has(char)) {
81 return logoColor
82 }
83
84 if (isReversing) {
85 // Reverse phase: characters behind the sheen return to logoColor
86 if (charIndex <= sheenPosition) {
87 return logoColor
88 }
89 // Characters ahead of the sheen stay accent color
90 return accentColor
91 } else {
92 // Forward phase: characters at or behind the sheen get the accent color
93 if (charIndex <= sheenPosition) {
94 return accentColor
95 }
96 // Characters ahead of the sheen remain original color
97 return logoColor
98 }
99}
100
101/**
102 * Parses the logo string into individual lines

Callers 1

useSheenAnimationFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected