Skip to content

Improve dark mode consistency, accessibility, and visual hierarchy#58

Open
Keerthan-Bhat wants to merge 2 commits into
AnirbansarkarS:mainfrom
Keerthan-Bhat:main
Open

Improve dark mode consistency, accessibility, and visual hierarchy#58
Keerthan-Bhat wants to merge 2 commits into
AnirbansarkarS:mainfrom
Keerthan-Bhat:main

Conversation

@Keerthan-Bhat

Copy link
Copy Markdown

Description
Overview This PR improves the core dark mode experience of the application by introducing a more cohesive color palette, improving text-to-background contrast, and establishing a clearer elevation hierarchy across components.

Changes Made

Theme Variables (index.css):
Refined --color-background to a deeper dark tone (#090B10) to reduce glare and improve contrast.
Updated surface variables (--color-surface, --color-surface-elevated) for better visual depth.
Softened --color-text-primary to #F8FAFC to reduce eye strain while maintaining accessibility.
Introduced a new semantic variable --color-border-subtle (rgba(255, 255, 255, 0.06)) to replace hardcoded border opacities.
Component Refactoring:
BookPreviewCard.jsx: Replaced hardcoded utility classes (border-white/10, text-white) with the new semantic theme variables (border-border-subtle, text-text-primary) for consistent styling and easier future theming.
ActivityFeed.jsx: Replaced hardcoded utility classes (border-white/5, text-white) with semantic variables, ensuring a unified look across the dashboard.
Impact These changes give the application a more premium and polished feel, make the codebase easier to maintain by utilizing centralized CSS variables, and significantly improve reading comfort for users in dark environments.
Screenshot 2026-05-17 004034

@AnirbansarkarS

Copy link
Copy Markdown
Owner

@Keerthan-Bhat whaat things you changed mark in sshot

@Keerthan-Bhat

Copy link
Copy Markdown
Author
click_feedback_1778990708663 click_feedback_1778990742433 click_feedback_1778990758153 click_feedback_1778990768765 click_feedback_1778990785673
  1. Global Color Palette & Theme Variables (index.css)
    I replaced generic colors with a carefully curated, premium dark theme palette using Tailwind CSS variables:

Core Background: Changed from a standard dark gray to a deep, atmospheric black/navy (#090B10).
Surface Colors: Cards and containers use a slightly lighter shade (#141724) to create depth and separate content from the background.
Primary Accent: A vibrant "Racing Red" (#ff002b) is used for active states, indicators, and primary buttons.
Borders: Subtle borders are styled with a translucent white (rgba(255, 255, 255, 0.06)), making lines clean without being distracting.
2. Typography & Readability
Primary Text: Set to an off-white color (#F8FAFC) to reduce eye strain while maintaining high contrast.
Secondary/Muted Text: Used shades like #94A3B8 and #64748B for descriptions, labels, and timestamps to create a clear visual hierarchy.
3. Component-Specific Changes (e.g., BookPreviewCard, ActivityFeed)
Semantic Classes: Hardcoded color classes (like bg-zinc-900 or text-gray-200) were replaced with semantic classes like bg-surface and text-text-primary. This ensures that if the theme variables are updated in the future, all components will update automatically.
Button Effects: The "Save to Library" and other primary buttons received a custom glowing effect using the primary red color with a low-opacity shadow (shadow-primary/20).
4. Discover Page Specifics
The Active Filter (like the "Fiction" category button) is filled with the solid primary red.
The Sidebar uses a thin border and gradient indicators (like the red dot next to "Discover") to show the current active page without cluttering the layout.
The Banner was kept vibrant with a gradient to serve as a strong focal point on the page.
These changes combined create a modern, high-contrast, and visually immersive dark mode experience across the entire application.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants