Skip to content

Commit 9b5ebca

Browse files
Tokclaude
andcommitted
feat: use brand lime color (#39ff14) for authentic gradient
- Extract brand lime color from CSS (--accent-lime: #39ff14) - Convert hex #39ff14 to ANSI 256 RGB scale: (1, 5, 0) - Create gradient from dark green (0,3,0) to brand lime (1,5,0) - Remove margin stretching to preserve authentic brand colors - Gradient now matches colors used throughout web UI Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
1 parent 5ea336e commit 9b5ebca

File tree

1 file changed

+9
-14
lines changed

1 file changed

+9
-14
lines changed

app.py

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -119,22 +119,19 @@ def _rgb_to_ansi256(r: int, g: int, b: int) -> int:
119119

120120

121121
def _get_lime_color(position: float) -> str:
122-
"""Lerp between dark green and bright lime RGB values for smooth gradient"""
123-
# Clamp position to valid range (handles stretched gradient beyond 0-1)
124-
position = max(0.0, min(1.0, position))
125-
126-
# Define start and end colors in RGB (0-5 scale for ANSI 256)
127-
# Dark green: no red, low-medium green, no blue
128-
start_rgb = (0, 2, 0) # Darker green
129-
# Bright lime: medium red, full green, no blue
130-
end_rgb = (3, 5, 0) # Bright lime
122+
"""Lerp between dark green and brand lime (#39ff14) for smooth gradient"""
123+
# Brand lime color from CSS: #39ff14 = RGB(57, 255, 20)
124+
# Converted to ANSI 0-5 scale: (1, 5, 0)
125+
# Create gradient from dark green to brand lime
126+
start_rgb = (0, 3, 0) # Dark green
127+
end_rgb = (1, 5, 0) # Brand lime (#39ff14)
131128

132129
# Lerp each RGB component with rounding for smoothness
133130
r = round(start_rgb[0] + (end_rgb[0] - start_rgb[0]) * position)
134131
g = round(start_rgb[1] + (end_rgb[1] - start_rgb[1]) * position)
135132
b = round(start_rgb[2] + (end_rgb[2] - start_rgb[2]) * position)
136133

137-
# Clamp to valid range
134+
# Clamp to valid range (0-5)
138135
r = max(0, min(5, r))
139136
g = max(0, min(5, g))
140137
b = max(0, min(5, b))
@@ -146,8 +143,7 @@ def _get_lime_color(position: float) -> str:
146143

147144
def _print_banner_border(border_width: int, char: str, row_offset: int, total_rows: int) -> None:
148145
"""Print border with diagonal gradient matching text"""
149-
# Stretch gradient beyond borders by 20% on each side to avoid artifacts
150-
margin = 0.2
146+
margin = 0.0 # No margin - let gradient span full banner
151147
max_diagonal = total_rows + border_width
152148

153149
border = " " + _get_lime_color(0.0 - margin) + "█" # Leading space
@@ -163,8 +159,7 @@ def _print_banner_border(border_width: int, char: str, row_offset: int, total_ro
163159
def _print_banner_line(line: str, row_idx: int, num_rows: int, max_diagonal: int) -> None:
164160
"""Print single banner line with diagonal gradient"""
165161
reset = "\033[0m"
166-
# Stretch gradient beyond borders by 20% on each side to avoid artifacts
167-
margin = 0.2
162+
margin = 0.0 # No margin - let gradient span full banner
168163

169164
# Left border with leading space
170165
left_pos = row_idx / (num_rows + 1)

0 commit comments

Comments
 (0)