aboutsummaryrefslogtreecommitdiff
path: root/components
diff options
context:
space:
mode:
Diffstat (limited to 'components')
-rw-r--r--components/filings.py35
-rw-r--r--components/insiders.py10
-rw-r--r--components/market_bar.py54
-rw-r--r--components/options.py4
-rw-r--r--components/overview.py57
-rw-r--r--components/top_movers.py42
-rw-r--r--components/valuation.py14
7 files changed, 121 insertions, 95 deletions
diff --git a/components/filings.py b/components/filings.py
index a1e4417..9e3b156 100644
--- a/components/filings.py
+++ b/components/filings.py
@@ -17,9 +17,9 @@ _FORM_DESCRIPTIONS = {
}
_FORM_COLORS = {
- "10-K": "rgba(79,142,247,0.15)",
- "10-Q": "rgba(130,224,170,0.15)",
- "8-K": "rgba(247,162,79,0.15)",
+ "10-K": "rgba(74,120,181,0.15)",
+ "10-Q": "rgba(79,140,94,0.15)",
+ "8-K": "rgba(196,149,69,0.15)",
}
@@ -74,18 +74,35 @@ def render_filings(ticker: str):
left, right = st.columns([5, 1])
with left:
st.markdown(
- f"<div style='background:{color};padding:6px 10px;border-radius:4px;margin-bottom:2px'>"
- f"<strong>{form}</strong> &nbsp;ยท&nbsp; "
- f"<span style='color:#9aa0b0;font-size:0.82rem'>{date}</span><br>"
- f"<span style='font-size:0.85rem'>{title}</span>"
+ f"<div style='"
+ f"background:{color};"
+ f"border:1px solid rgba(194,170,122,0.12);"
+ f"padding:8px 12px;border-radius:2px;margin-bottom:2px;"
+ f"display:flex;align-items:baseline;gap:10px;"
+ f"'>"
+ f"<span style='"
+ f"font-family:IBM Plex Mono,monospace;"
+ f"font-size:11px;color:#C2AA7A;"
+ f"background:rgba(194,170,122,0.07);"
+ f"border:1px solid rgba(194,170,122,0.25);"
+ f"padding:2px 6px;border-radius:2px;"
+ f"white-space:nowrap;"
+ f"'>{form}</span>"
+ f"<span style='font-family:IBM Plex Sans,sans-serif;font-size:0.8125rem;color:#F2ECDC;'>{title}</span>"
+ f"<span style='font-family:IBM Plex Mono,monospace;font-size:11px;color:#5E5849;margin-left:auto;white-space:nowrap;'>{date}</span>"
f"</div>",
unsafe_allow_html=True,
)
with right:
- # Prefer the actual filing doc over the Yahoo index page
doc_url = exhibits.get(form) or edgar_url
if doc_url:
st.markdown(
- f"<div style='padding-top:8px'><a href='{doc_url}' target='_blank'>๐Ÿ”— View</a></div>",
+ f"<div style='padding-top:8px;text-align:right;'>"
+ f"<a href='{doc_url}' target='_blank' style='"
+ f"font-family:IBM Plex Sans,sans-serif;"
+ f"font-size:11px;color:#C2AA7A;"
+ f"text-decoration:none;"
+ f"border-bottom:1px solid #8F7A50;"
+ f"'>View โ†—</a></div>",
unsafe_allow_html=True,
)
diff --git a/components/insiders.py b/components/insiders.py
index 07bc3e3..bdb1818 100644
--- a/components/insiders.py
+++ b/components/insiders.py
@@ -83,18 +83,16 @@ def render_insiders(ticker: str):
fig = go.Figure()
fig.add_trace(go.Bar(
x=months, y=[monthly[m]["Buy"] / 1e6 for m in months],
- name="Buys", marker_color="#2ecc71",
+ name="Buys", marker_color="#4F8C5E",
))
fig.add_trace(go.Bar(
x=months, y=[-monthly[m]["Sell"] / 1e6 for m in months],
- name="Sells", marker_color="#e74c3c",
+ name="Sells", marker_color="#B5494B",
))
fig.update_layout(
title="Monthly Insider Net Activity ($M)",
barmode="relative",
yaxis_title="Value ($M)",
- plot_bgcolor="rgba(0,0,0,0)",
- paper_bgcolor="rgba(0,0,0,0)",
margin=dict(l=0, r=0, t=40, b=0),
height=280,
legend=dict(orientation="h", yanchor="bottom", y=1.02, xanchor="right", x=1),
@@ -133,9 +131,9 @@ def render_insiders(ticker: str):
def _color_type(row):
if row["Type"] == "Buy":
- return [""] * 3 + ["background-color: rgba(46,204,113,0.15)"] + [""] * 2
+ return [""] * 3 + ["background-color: #15241A; color: #4F8C5E"] + [""] * 2
if row["Type"] == "Sell":
- return [""] * 3 + ["background-color: rgba(231,76,60,0.15)"] + [""] * 2
+ return [""] * 3 + ["background-color: #2A1517; color: #B5494B"] + [""] * 2
return [""] * len(row)
st.dataframe(
diff --git a/components/market_bar.py b/components/market_bar.py
index 411b232..e3accc5 100644
--- a/components/market_bar.py
+++ b/components/market_bar.py
@@ -23,46 +23,38 @@ def render_market_bar():
"""
<style>
.prism-market-card {
- background: rgba(22, 28, 39, 0.92);
- border: 1px solid rgba(255,255,255,0.06);
- border-radius: 14px;
- padding: 0.8rem 0.95rem;
- min-height: 96px;
+ background: #11151C;
+ border: 1px solid #232934;
+ border-radius: 2px;
+ padding: 12px 16px;
}
.prism-market-label {
- color: #9aa0b0;
- font-size: 0.78rem;
+ font-family: 'IBM Plex Sans', sans-serif;
+ font-size: 10px;
font-weight: 600;
- letter-spacing: 0.06em;
+ letter-spacing: 0.14em;
text-transform: uppercase;
- margin-bottom: 0.45rem;
+ color: #5E5849;
+ margin-bottom: 6px;
}
.prism-market-value {
- color: #f3f6fb;
- font-size: 1.5rem;
- font-weight: 700;
- line-height: 1.15;
- margin-bottom: 0.45rem;
+ font-family: 'IBM Plex Mono', monospace;
+ font-variant-numeric: tabular-nums;
+ font-size: 1.25rem;
+ font-weight: 500;
+ color: #F2ECDC;
+ line-height: 1.1;
+ margin-bottom: 4px;
}
.prism-market-delta {
- display: inline-block;
- border-radius: 999px;
- font-size: 0.78rem;
- font-weight: 600;
- padding: 0.18rem 0.5rem;
- }
- .prism-market-delta.positive {
- color: #7ce3a1;
- background: rgba(28, 131, 72, 0.18);
- }
- .prism-market-delta.negative {
- color: #ff8a8a;
- background: rgba(180, 47, 47, 0.18);
- }
- .prism-market-delta.neutral {
- color: #c6cfdd;
- background: rgba(198, 207, 221, 0.12);
+ font-family: 'IBM Plex Mono', monospace;
+ font-variant-numeric: tabular-nums;
+ font-size: 11px;
+ font-weight: 500;
}
+ .prism-market-delta.positive { color: #4F8C5E; }
+ .prism-market-delta.negative { color: #B5494B; }
+ .prism-market-delta.neutral { color: #5E5849; }
</style>
""",
unsafe_allow_html=True,
diff --git a/components/options.py b/components/options.py
index e9bf016..0acce31 100644
--- a/components/options.py
+++ b/components/options.py
@@ -104,7 +104,7 @@ def render_options(ticker: str):
y=calls_atm["impliedVolatility"] * 100,
name="Calls IV",
mode="lines+markers",
- line=dict(color="#4F8EF7", width=2),
+ line=dict(color="#C2AA7A", width=2),
marker=dict(size=4),
))
if not puts_atm.empty and "impliedVolatility" in puts_atm.columns:
@@ -113,7 +113,7 @@ def render_options(ticker: str):
y=puts_atm["impliedVolatility"] * 100,
name="Puts IV",
mode="lines+markers",
- line=dict(color="#F7A24F", width=2),
+ line=dict(color="#C49545", width=2),
marker=dict(size=4),
))
if current_price:
diff --git a/components/overview.py b/components/overview.py
index 1bb65c2..9a0d162 100644
--- a/components/overview.py
+++ b/components/overview.py
@@ -118,22 +118,22 @@ def _score_card(info: dict) -> None:
return
color_map = {
- "green": ("rgba(46,204,113,0.15)", "#7ce3a1"),
- "yellow": ("rgba(243,156,18,0.15)", "#f0c040"),
- "red": ("rgba(231,76,60,0.15)", "#ff8a8a"),
- "neutral": ("rgba(255,255,255,0.05)", "#9aa0b0"),
+ "green": ("#15241A", "#4F8C5E"),
+ "yellow": ("#2A1F0F", "#C49545"),
+ "red": ("#2A1517", "#B5494B"),
+ "neutral": ("#181D26", "#5E5849"),
}
cards_html = ""
for label, color, value, desc in signals:
bg, fg = color_map[color]
cards_html += (
- f'<div style="background:{bg};border:1px solid {fg}44;border-radius:10px;'
- f'padding:0.5rem 0.75rem;flex:1;min-width:110px;">'
- f'<div style="font-size:0.68rem;font-weight:600;color:#9aa0b0;text-transform:uppercase;'
- f'letter-spacing:0.05em;margin-bottom:0.15rem;">{label}</div>'
- f'<div style="font-size:0.85rem;font-weight:700;color:{fg};">{value}</div>'
- f'<div style="font-size:0.68rem;color:#9aa0b0;margin-top:0.1rem;">{desc}</div>'
+ f'<div style="background:{bg};border:1px solid {fg}55;border-radius:2px;'
+ f'padding:8px 12px;flex:1;min-width:110px;">'
+ f'<div style="font-family:IBM Plex Sans,sans-serif;font-size:10px;font-weight:600;color:#5E5849;text-transform:uppercase;'
+ f'letter-spacing:0.12em;margin-bottom:3px;">{label}</div>'
+ f'<div style="font-family:IBM Plex Mono,monospace;font-size:0.875rem;font-weight:500;color:{fg};font-variant-numeric:tabular-nums;">{value}</div>'
+ f'<div style="font-family:IBM Plex Sans,sans-serif;font-size:0.75rem;color:#8E8676;margin-top:2px;">{desc}</div>'
f'</div>'
)
@@ -159,23 +159,28 @@ def _render_52w_bar(info: dict) -> None:
st.markdown(
f"""
- <div style="margin:0.4rem 0 0.9rem 0;">
- <div style="display:flex;justify-content:space-between;font-size:0.72rem;color:#9aa0b0;margin-bottom:0.35rem;">
- <span>52W Low: {fmt_currency(low)}</span>
- <span style="color:#c6cfdd;font-weight:600;">
- {fmt_currency(price)} &nbsp;ยท&nbsp; {pct:.0f}% of range
+ <div style="margin:8px 0 16px 0;">
+ <div style="display:flex;justify-content:space-between;
+ font-family:'IBM Plex Mono',monospace;font-size:11px;
+ font-variant-numeric:tabular-nums;
+ color:#8E8676;margin-bottom:6px;">
+ <span>{fmt_currency(low)}</span>
+ <span style="color:#C2AA7A;font-weight:500;">
+ {fmt_currency(price)} &nbsp;ยท&nbsp; {pct:.0f}%
</span>
- <span>52W High: {fmt_currency(high)}</span>
+ <span>{fmt_currency(high)}</span>
</div>
- <div style="position:relative;height:7px;background:rgba(255,255,255,0.08);border-radius:4px;overflow:visible;">
+ <div style="position:relative;height:3px;background:#222934;border-radius:999px;overflow:visible;">
<div style="position:absolute;left:0;width:{pct}%;height:100%;
- background:linear-gradient(to right,#e74c3c,#f0b27a,#2ecc71);border-radius:4px;"></div>
- <div style="position:absolute;left:calc({pct}% - 2px);top:-4px;width:4px;height:15px;
- background:#fff;border-radius:2px;box-shadow:0 0 5px rgba(0,0,0,0.5);"></div>
+ background:#C2AA7A;border-radius:999px;"></div>
+ <div style="position:absolute;left:calc({pct}% - 1px);top:-4px;width:2px;height:11px;
+ background:#DCC79E;border-radius:1px;"></div>
</div>
- <div style="display:flex;justify-content:space-between;font-size:0.68rem;color:#9aa0b0;margin-top:0.3rem;">
- <span>+{from_low_pct:.1f}% above low</span>
- <span>{to_high_pct:.1f}% below high</span>
+ <div style="display:flex;justify-content:space-between;
+ font-family:'IBM Plex Mono',monospace;font-size:10px;
+ color:#5E5849;margin-top:5px;">
+ <span>+{from_low_pct:.1f}% from low</span>
+ <span>{to_high_pct:.1f}% to high</span>
</div>
</div>
""",
@@ -286,10 +291,10 @@ def _render_relative_chart(ticker: str, info: dict, period: str):
y=subject_series.values,
mode="lines",
name=ticker.upper(),
- line=dict(color="#4F8EF7", width=2.5),
+ line=dict(color="#C2AA7A", width=2.5),
))
- palette = ["#7ce3a1", "#F7A24F", "#c084fc", "#ff8a8a", "#9ad1ff"]
+ palette = ["#7ce3a1", "#C49545", "#c084fc", "#ff8a8a", "#9ad1ff"]
plotted = 1
for idx, label in enumerate(selected_labels):
symbol = option_map[label]
@@ -424,7 +429,7 @@ def render_overview(ticker: str):
y=hist["Close"],
mode="lines",
name="Close",
- line=dict(color="#4F8EF7", width=2),
+ line=dict(color="#C2AA7A", width=2),
fill="tozeroy",
fillcolor="rgba(79,142,247,0.08)",
))
diff --git a/components/top_movers.py b/components/top_movers.py
index 5589df6..db95592 100644
--- a/components/top_movers.py
+++ b/components/top_movers.py
@@ -28,30 +28,39 @@ def _inject_styles():
padding: 0.18rem 0;
}
.prism-mover-symbol {
- font-size: 1rem;
- font-weight: 700;
+ font-family: 'IBM Plex Sans', sans-serif;
+ font-size: 0.875rem;
+ font-weight: 600;
+ color: #F2ECDC;
line-height: 1.1;
}
.prism-mover-name {
- color: #9aa0b0;
- font-size: 0.84rem;
+ font-family: 'IBM Plex Sans', sans-serif;
+ color: #8E8676;
+ font-size: 0.8125rem;
line-height: 1.15;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.prism-mover-price {
- font-size: 0.98rem;
+ font-family: 'IBM Plex Mono', monospace;
+ font-variant-numeric: tabular-nums;
+ font-size: 0.8125rem;
+ color: #C7C0AE;
line-height: 1.1;
}
.prism-mover-change {
- font-size: 0.98rem;
- font-weight: 600;
+ font-family: 'IBM Plex Mono', monospace;
+ font-variant-numeric: tabular-nums;
+ font-size: 0.8125rem;
+ font-weight: 500;
line-height: 1.1;
}
.prism-mover-change-meta {
- font-size: 0.74rem;
- color: #9aa0b0;
+ font-family: 'IBM Plex Mono', monospace;
+ font-size: 11px;
+ color: #5E5849;
margin-left: 0.2rem;
}
@media (max-width: 900px) {
@@ -91,7 +100,7 @@ def _mover_row_html(q: dict) -> str:
try:
chg_f = float(chg_pct)
- color = "#2ecc71" if chg_f >= 0 else "#e74c3c"
+ color = "#4F8C5E" if chg_f >= 0 else "#B5494B"
sign = "+" if chg_f >= 0 else ""
pct_str = f"{sign}{chg_f:.2f}%"
except Exception:
@@ -143,11 +152,16 @@ def _render_mover_tab(screen: str, state_key: str):
@st.fragment
def render_top_movers():
_inject_styles()
- st.markdown("#### ๐Ÿ”ฅ Top Movers")
+ st.markdown("""
+ <div style="
+ font-family:'IBM Plex Sans',sans-serif;
+ font-size:10px;font-weight:600;
+ text-transform:uppercase;letter-spacing:0.14em;
+ color:#5E5849;margin-bottom:8px;
+ ">Top Movers</div>
+ """, unsafe_allow_html=True)
- tab_gainers, tab_losers, tab_active = st.tabs([
- "๐Ÿ“ˆ Gainers", "๐Ÿ“‰ Losers", "โšก Most Active"
- ])
+ tab_gainers, tab_losers, tab_active = st.tabs(["Gainers", "Losers", "Most Active"])
screens = {
"gainers": "day_gainers",
diff --git a/components/valuation.py b/components/valuation.py
index 0095f41..a141846 100644
--- a/components/valuation.py
+++ b/components/valuation.py
@@ -586,7 +586,7 @@ def _render_dcf_model(ctx: dict):
fig = go.Figure(go.Bar(
x=years + ["Terminal Value"],
y=[(v / 1e9) for v in discounted] + [terminal_pv / 1e9],
- marker_color=["#4F8EF7"] * len(years) + ["#F7A24F"],
+ marker_color=["#C2AA7A"] * len(years) + ["#C49545"],
text=[f"${v / 1e9:.2f}B" for v in discounted] + [f"${terminal_pv / 1e9:.2f}B"],
textposition="outside",
))
@@ -1235,7 +1235,7 @@ def _render_analyst_targets(ticker: str):
st.write("")
- colors = ["#2ecc71", "#82e0aa", "#f0b27a", "#e59866", "#e74c3c"]
+ colors = ["#4F8C5E", "#4F8C5E", "#C49545", "#8F7A50", "#B5494B"]
fig = go.Figure(go.Bar(
x=list(counts.keys()),
y=list(counts.values()),
@@ -1314,14 +1314,14 @@ def _render_earnings_history(ticker: str):
y=df_chart["epsActual"],
name="Actual EPS",
mode="lines+markers",
- line=dict(color="#4F8EF7", width=2),
+ line=dict(color="#C2AA7A", width=2),
))
fig.add_trace(go.Scatter(
x=df_chart.index.astype(str),
y=df_chart["epsEstimate"],
name="Estimated EPS",
mode="lines+markers",
- line=dict(color="#F7A24F", width=2, dash="dash"),
+ line=dict(color="#C49545", width=2, dash="dash"),
))
fig.update_layout(
title="EPS: Actual vs. Estimate",
@@ -1351,7 +1351,7 @@ _HIST_RATIO_OPTIONS = {
}
_CHART_COLORS = [
- "#4F8EF7", "#F7A24F", "#2ecc71", "#e74c3c",
+ "#C2AA7A", "#C49545", "#4F8C5E", "#B5494B",
"#9b59b6", "#1abc9c", "#f39c12", "#e67e22",
]
@@ -1534,7 +1534,7 @@ def _render_forward_estimates(ticker: str):
y=hist["epsActual"],
name="EPS Actual",
mode="lines+markers",
- line=dict(color="#4F8EF7", width=2),
+ line=dict(color="#C2AA7A", width=2),
))
if fwd_dates:
@@ -1560,7 +1560,7 @@ def _render_forward_estimates(ticker: str):
y=fwd_eps,
name="EPS Est. (Avg)",
mode="lines+markers",
- line=dict(color="#F7A24F", width=2, dash="dash"),
+ line=dict(color="#C49545", width=2, dash="dash"),
))
fig.update_layout(