dark-mode
Skill này làm gì
Giúp tạo diện mạo tối cho website và ứng dụng, dùng các màu xám đậm thay vì đen tuyệt đối. Điều này giúp màn hình thoải mái hơn cho mắt và mang lại cảm giác hiện đại.
Khi nào nên dùng
- ✓Khi bạn muốn website hoặc ứng dụng trông hiện đại và thanh lịch hơn.
- ✓Khi bạn muốn giảm mỏi mắt trong môi trường thiếu sáng.
- ✓Khi thiết kế cần phong cách tối giản và tinh tế hơn.
Liên kết skill
https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/design-it/dark-mode/SKILL.mdSao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.
Cách dùng
Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.
Tin nhắn có sẵn để dán
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Làm thế nào để website của tôi có giao diện tối đẹp mắt và không gây mỏi mắt?”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
AI dùng các tông xám đậm thay vì đen tuyệt đối, và các màu sáng hơn cho những phần tử quan trọng. Điều này đảm bảo dễ đọc và thoải mái thị giác, theo các nguyên tắc thiết kế cụ thể cho chế độ tối.
Nội dung kỹ thuật (SKILL.md gốc)
Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.
Dark Mode Design
"Not just inverted colors. A carefully constructed hierarchy of light on dark."
When to Use
Use this sub-style when the user's request matches the aesthetic described above. This is a child reference of the design-it skill and is not meant to be triggered directly.
Core Principles
- Never Pure Black: True
#000000causes smearing on OLED screens and extreme eye strain with white text. Use dark greys (e.g.,#121212or#0A0A0A). - Elevation via Lightness: In light mode, shadows show elevation. In dark mode, shadows are invisible, so elevated surfaces must be lighter than the background.
- Desaturated Accents: Saturated colors vibrate painfully against dark backgrounds. Tone down the saturation of brand colors.
Visual DNA
- Colors: Midnight Luxury or Minimalist Slate (inverted). Background
#121212. Elevated cards#1E1E1E,#252525. Primary text#E1E1E1(not#FFFFFF). - Typography: Standard highly readable sans-serifs, but often dropped down one font weight compared to light mode, as light text on dark backgrounds appears optically thicker.
- Shadows: Pure black shadows, but with much lower opacity, mostly to separate slightly different shades of grey.
Web Implementation
- CSS Example:
:root {
--bg-base: #121212;
--bg-elevated-1: #1E1E1E;
--bg-elevated-2: #242424;
--text-high-emphasis: rgba(255, 255, 255, 0.87);
--text-medium-emphasis: rgba(255, 255, 255, 0.60);
/* Accent color: Desaturated purple instead of bright purple */
--accent-color: #BB86FC;
}
body {
background-color: var(--bg-base);
color: var(--text-high-emphasis);
font-weight: 300; /* Thinner weight for dark mode */
}
.dark-card {
background-color: var(--bg-elevated-1);
border-radius: 8px;
padding: 24px;
/* Very subtle border can help separate dark surfaces */
border: 1px solid rgba(255, 255, 255, 0.05);
}
.dark-card:hover {
/* On hover, the element moves closer to the user, so it gets lighter */
background-color: var(--bg-elevated-2);
}
.dark-btn {
background-color: var(--accent-color);
color: #000; /* Dark text on light accent is highly readable */
font-weight: 600;
border: none;
padding: 12px 24px;
border-radius: 4px;
}
App Implementation
SwiftUI
struct DarkModeView: View {
// Force Dark Mode on this specific view (or use system settings)
@Environment(\.colorScheme) var colorScheme
var body: some View {
ScrollView {
VStack(spacing: 20) {
// Primary elevated card
VStack(alignment: .leading, spacing: 12) {
Text("Elevation via Lightness")
.font(.headline)
.foregroundColor(.primary) // Auto-adapts
Text("In dark mode, elevated surfaces are lighter grey, not shadowed.")
.font(.subheadline)
.foregroundColor(.secondary) // Auto-adapts
}
.padding()
.frame(maxWidth: .infinity, alignment: .leading)
// Use native semantic colors. .secondarySystemBackground is lighter than .systemBackground
.background(Color(UIColor.secondarySystemBackground))
.cornerRadius(12)
// Desaturated Accent Button
Button(action: {}) {
Text("Desaturated Accent")
.fontWeight(.semibold)
.foregroundColor(.black) // Dark text on light accent
.padding()
.frame(maxWidth: .infinity)
.background(Color(red: 0.73, green: 0.52, blue: 0.98)) // #BB86FC (Desaturated purple)
.cornerRadius(8)
}
}
.padding()
}
// #121212 is the standard dark mode background, which systemBackground maps to closely
.background(Color(UIColor.systemBackground))
}
}
// .preferredColorScheme(.dark) to force
- Rely on Semantics: SwiftUI's
Color.primary,Color.secondary,Color(UIColor.systemBackground)andColor(UIColor.secondarySystemBackground)handle perfect dark mode transitions automatically. - Avoid forcing explicit hex codes for backgrounds unless you are building a custom-themed app.
Flutter
import 'package:flutter/material.dart';
…
Câu hỏi thường gặp
Vì sao không dùng đen tuyệt đối (#000000)?
Đen tuyệt đối có thể gây mỏi mắt khi kết hợp với chữ trắng và gây vấn đề trên một số màn hình (OLED). Dùng các màu xám đậm như #121212 tốt hơn.
Các phần tử nổi bật trong nền tối thế nào?
Thay vì bóng đổ, người ta dùng các tông xám sáng hơn cho những phần tử cần nổi bật, như thẻ hoặc nút.
Màu rực rỡ có còn phù hợp không?
Màu quá rực có thể gây khó chịu trên nền tối. Nên dùng phiên bản màu ít bão hòa hơn (nhạt hơn) để giữ sự hài hòa.
Chi tiết
Mô tả gốc của tác giả
Web and App implementation guide for Dark Mode Design. Trigger when user wants dark surfaces, reduced eye strain, and premium sleek aesthetics.
Độ phổ biến
- Sao GitHub
- 48k
- Vị trí xếp hạng
- #4390
- Giấy phép
- MIT
- Cập nhật
- 15/10/2026
Bình luận
- …
Thêm skill từ kho mã này
00-andruia-consultant
48kGiúp agent của bạn bắt đầu hoặc cải thiện các dự án AI. Phân tích mã, gợi ý công cụ và lập kế hoạch hành động bằng tiếng Tây Ban Nha.
007
48kCho phép agent của bạn thực hiện kiểm toán bảo mật và mô hình hóa mối đe dọa. Hữu ích để bảo vệ dự án khỏi các cuộc tấn công và lỗ hổng.
10-andruia-skill-smith
48kGiúp agent của bạn tạo hoặc cải thiện các công cụ AI. Xác định cách công cụ hoạt động, viết tài liệu và kiểm tra cấu trúc.
20-andruia-niche-intelligence
48kGiúp agent của bạn tạo bản tóm tắt về một ngành cụ thể. Hữu ích để hiểu bối cảnh, quy tắc, cách người dùng tương tác và rủi ro của dự án.
Skill tương tự
canvas
394kCho phép agent của bạn hiện một widget trực quan được lưu trữ trên bảng Mac đã kết nối, rồi ẩn bảng hoặc chuyển nó sang trang khác.
control-ui
394kGiúp agent của bạn sắp xếp và khắc phục sự cố Control UI của OpenClaw, gồm các phiên, bảng điều khiển và Gateway đã kết nối.
diagram-maker
394kGiúp agent của bạn vẽ sơ đồ rõ ràng dạng SVG, HTML hoặc Excalidraw có thể sửa, cho quy trình, kiến trúc hệ thống và bản phác bảng trắng.