security_auditor / theme.py
MugdhaV
Initial deployment: Gradio frontend with Modal backend - Multi-language security scanner with parallel processing
e1e9580
"""
Custom Gradio Theme for Security Auditor
Based on design mockups in assets/ folder
"""
import gradio as gr
def create_security_auditor_theme():
"""
Create Anthropic.com-inspired theme for Security Auditor.
Color Palette:
- Background: Light cream #faf9f6 (Anthropic-inspired)
- Primary Text: Dark slate #131314
- Accent: Warm terracotta #d97757
- Cards: Pure white #ffffff
- Borders: Light gray #e5e7eb
Design Philosophy:
- Minimalist, clean aesthetic with generous whitespace
- Neutral palette with warm accents
- Subtle borders, no heavy shadows
- Accessibility-focused
"""
theme = gr.themes.Soft(
primary_hue=gr.themes.colors.orange,
secondary_hue=gr.themes.colors.neutral,
neutral_hue=gr.themes.colors.neutral,
font=[
"system-ui",
"-apple-system",
"BlinkMacSystemFont",
"Segoe UI",
"Roboto",
"sans-serif"
],
font_mono=[
"ui-monospace",
"SF Mono",
"Monaco",
"Cascadia Code",
"monospace"
]
).set(
# Background colors
body_background_fill="#faf9f6", # Light cream
body_background_fill_dark="#131314", # Dark mode fallback
# Block/Card styling
block_background_fill="#ffffff",
block_border_width="1px",
block_border_color="#e5e7eb",
block_shadow="none", # Minimal shadows
block_radius="8px", # Smaller radius for cleaner look
# Button styling - Anthropic style
button_primary_background_fill="#d97757", # Warm terracotta
button_primary_background_fill_hover="#cc6944", # Darker terracotta
button_primary_text_color="#ffffff",
button_primary_border_color="#d97757",
button_secondary_background_fill="transparent", # Minimal secondary
button_secondary_background_fill_hover="rgba(217, 119, 87, 0.1)",
button_secondary_text_color="#131314",
button_secondary_border_color="#e5e7eb",
# Input styling
input_background_fill="#ffffff",
input_border_width="1px",
input_border_color="#e5e7eb",
input_shadow="none",
input_radius="6px",
# Text colors
body_text_color="#131314", # Dark slate
body_text_color_subdued="#6b7280", # Medium gray
# Link colors
link_text_color="#d97757",
link_text_color_hover="#cc6944"
)
return theme