์ฝ˜ํ…์ธ  ๋Œ€ํ‘œ ์ด๋ฏธ์ง€ - ๐ŸŒ™ ์›Œ๋“œํ”„๋ ˆ์Šค ๋‹คํฌ ๋ชจ๋“œ ๊ตฌํ˜„ํ•˜๊ธฐ

๐ŸŒ™ ์›Œ๋“œํ”„๋ ˆ์Šค ๋‹คํฌ ๋ชจ๋“œ ๊ตฌํ˜„ํ•˜๊ธฐ

์‚ฌ์šฉ์ž ๊ฒฝํ—˜์„ ํ•œ ๋‹จ๊ณ„ ์—…๊ทธ๋ ˆ์ด๋“œํ•˜๋Š” ๋‹คํฌ ๋ชจ๋“œ ์™„๋ฒฝ ๊ฐ€์ด๋“œ

์š”์ฆ˜ ์›น์‚ฌ์ดํŠธ๋‚˜ ์•ฑ์„ ๋ณด๋ฉด ๋‹คํฌ ๋ชจ๋“œ๊ฐ€ ๊ฑฐ์˜ ํ•„์ˆ˜ ๊ธฐ๋Šฅ์ฒ˜๋Ÿผ ์ž๋ฆฌ ์žก์•˜์ง€? ๐ŸŒƒ
๋ฐค์— ์Šค๋งˆํŠธํฐ ๋ณด๋‹ค๊ฐ€ ๋ˆˆ์ด ๋ถ€์…”์„œ ํ™”๋ฉด ๋ฐ๊ธฐ๋ฅผ ์ตœ์†Œ๋กœ ๋‚ฎ์ถฐ๋ณธ ๊ฒฝํ—˜, ๋‹ค๋“ค ์žˆ์„ ๊ฑฐ์•ผ.
๋‹คํฌ ๋ชจ๋“œ๋Š” ๋‹จ์ˆœํžˆ '๊ฒ€์€ ๋ฐฐ๊ฒฝ'์ด ์•„๋‹ˆ๋ผ, ์‚ฌ์šฉ์ž์˜ ๋ˆˆ ๊ฑด๊ฐ•๊ณผ ๋ฐฐํ„ฐ๋ฆฌ ์ˆ˜๋ช…, ๊ทธ๋ฆฌ๊ณ  ์ „์ฒด์ ์ธ ์‚ฌ์šฉ ๊ฒฝํ—˜์„ ๊ฐœ์„ ํ•˜๋Š” ๊ฐ•๋ ฅํ•œ ๋„๊ตฌ์•ผ.

์›Œ๋“œํ”„๋ ˆ์Šค๋กœ ์›น์‚ฌ์ดํŠธ๋ฅผ ์šด์˜ํ•˜๊ณ  ์žˆ๋‹ค๋ฉด, ๋‹คํฌ ๋ชจ๋“œ ๊ตฌํ˜„์€ ์ƒ๊ฐ๋ณด๋‹ค ์–ด๋ ต์ง€ ์•Š์•„.
์ด ๊ธ€์—์„œ๋Š” ์ดˆ๋ณด์ž๋„ ๋”ฐ๋ผ ํ•  ์ˆ˜ ์žˆ๋Š” ์‹ค์ „ ๋ฐฉ๋ฒ•๋ถ€ํ„ฐ, ๊ฐœ๋ฐœ์ž๋ฅผ ์œ„ํ•œ ๊ณ ๊ธ‰ ์ปค์Šคํ„ฐ๋งˆ์ด์ง•๊นŒ์ง€ ๋ชจ๋‘ ๋‹ค๋ค„๋ณผ๊ฒŒ! ๐Ÿ’ช

๐ŸŽฏ ๋‹คํฌ ๋ชจ๋“œ, ์™œ ํ•„์š”ํ• ๊นŒ?

๋‹คํฌ ๋ชจ๋“œ๋ฅผ ๊ตฌํ˜„ํ•˜๊ธฐ ์ „์—, ์™œ ์ด๊ฒŒ ์ค‘์š”ํ•œ์ง€๋ถ€ํ„ฐ ์•Œ์•„๋ณด์ž.
๋‹จ์ˆœํžˆ '๋ฉ‹์žˆ์–ด ๋ณด์—ฌ์„œ'๊ฐ€ ์•„๋‹ˆ๋ผ, ์‹ค์งˆ์ ์ธ ์ด์œ ๋“ค์ด ์žˆ์–ด.

๐Ÿ‘๏ธ ๋ˆˆ ๊ฑด๊ฐ• ๋ณดํ˜ธ

๋ฐ์€ ํ™”๋ฉด์„ ์˜ค๋ž˜ ๋ณด๋ฉด ๋ˆˆ์˜ ํ”ผ๋กœ๋„๊ฐ€ ๊ธ‰๊ฒฉํžˆ ์ฆ๊ฐ€ํ•ด.
ํŠนํžˆ ์–ด๋‘์šด ํ™˜๊ฒฝ์—์„œ ๋ฐ์€ ํ™”๋ฉด์„ ๋ณด๋ฉด ๋™๊ณต์ด ์ˆ˜์ถ•ํ•˜๋ฉด์„œ ๋ˆˆ์— ๋” ํฐ ๋ถ€๋‹ด์„ ์ฃผ์ง€.
๋‹คํฌ ๋ชจ๋“œ๋Š” ํ™”๋ฉด์˜ ๋ฐ๊ธฐ๋ฅผ ๋‚ฎ์ถฐ์„œ ๋ˆˆ์˜ ํ”ผ๋กœ๋ฅผ ์ค„์—ฌ์ฃผ๊ณ , ๋ธ”๋ฃจ๋ผ์ดํŠธ ๋…ธ์ถœ๋„ ๊ฐ์†Œ์‹œ์ผœ์ค˜. ๐Ÿ˜Œ

๐Ÿ’ก ์žฌ๋ฏธ์žˆ๋Š” ์‚ฌ์‹ค: ๋ฏธ๊ตญ ์•ˆ๊ณผํ•™ํšŒ(AAO)์˜ ์—ฐ๊ตฌ์— ๋”ฐ๋ฅด๋ฉด, ์–ด๋‘์šด ํ™˜๊ฒฝ์—์„œ ๋‹คํฌ ๋ชจ๋“œ๋ฅผ ์‚ฌ์šฉํ•˜๋ฉด ๋ˆˆ์˜ ํ”ผ๋กœ๋„๊ฐ€ ์ตœ๋Œ€ 60%๊นŒ์ง€ ๊ฐ์†Œํ•œ๋‹ค๊ณ  ํ•ด!

๐Ÿ”‹ ๋ฐฐํ„ฐ๋ฆฌ ์ˆ˜๋ช… ์—ฐ์žฅ

OLED๋‚˜ AMOLED ๋””์Šคํ”Œ๋ ˆ์ด๋ฅผ ์‚ฌ์šฉํ•˜๋Š” ๊ธฐ๊ธฐ์—์„œ๋Š” ๋‹คํฌ ๋ชจ๋“œ๊ฐ€ ๋ฐฐํ„ฐ๋ฆฌ ์ˆ˜๋ช…์„ ํฌ๊ฒŒ ๋Š˜๋ ค์ค˜.
์ด๋Ÿฐ ๋””์Šคํ”Œ๋ ˆ์ด๋Š” ๊ฒ€์€์ƒ‰ ํ”ฝ์…€์„ ํ‘œ์‹œํ•  ๋•Œ ์ „๋ ฅ์„ ๊ฑฐ์˜ ์†Œ๋น„ํ•˜์ง€ ์•Š๊ฑฐ๋“ .
๊ตฌ๊ธ€์˜ ํ…Œ์ŠคํŠธ ๊ฒฐ๊ณผ, ์œ ํŠœ๋ธŒ ์•ฑ์—์„œ ๋‹คํฌ ๋ชจ๋“œ๋ฅผ ์‚ฌ์šฉํ•˜๋ฉด ๋ฐฐํ„ฐ๋ฆฌ ์†Œ๋ชจ๊ฐ€ ์•ฝ 43% ๊ฐ์†Œํ–ˆ๋‹ค๊ณ  ํ•ด! ๐Ÿ”Œ

๐ŸŽจ ๋ฏธ์  ์„ ํƒ์˜ ๋‹ค์–‘์„ฑ

์‚ฌ์šฉ์ž๋งˆ๋‹ค ์„ ํ˜ธํ•˜๋Š” ์ธํ„ฐํŽ˜์ด์Šค ์Šคํƒ€์ผ์ด ๋‹ฌ๋ผ.
์–ด๋–ค ์‚ฌ๋žŒ์€ ๋ฐ๊ณ  ๊น”๋”ํ•œ ๋ผ์ดํŠธ ๋ชจ๋“œ๋ฅผ ์ข‹์•„ํ•˜๊ณ , ์–ด๋–ค ์‚ฌ๋žŒ์€ ์„ธ๋ จ๋˜๊ณ  ์ง‘์ค‘ํ•˜๊ธฐ ์ข‹์€ ๋‹คํฌ ๋ชจ๋“œ๋ฅผ ์„ ํ˜ธํ•˜์ง€.
์„ ํƒ๊ถŒ์„ ์ œ๊ณตํ•˜๋Š” ๊ฒƒ ์ž์ฒด๊ฐ€ ์‚ฌ์šฉ์ž ๊ฒฝํ—˜์„ ํ–ฅ์ƒ์‹œํ‚ค๋Š” ๊ฑฐ์•ผ.

โ™ฟ ์ ‘๊ทผ์„ฑ ํ–ฅ์ƒ

์‹œ๊ฐ ์žฅ์• ๋‚˜ ๊ด‘๊ณผ๋ฏผ์„ฑ์„ ๊ฐ€์ง„ ์‚ฌ์šฉ์ž๋“ค์—๊ฒŒ ๋‹คํฌ ๋ชจ๋“œ๋Š” ํ•„์ˆ˜์ ์ธ ๊ธฐ๋Šฅ์ด์•ผ.
๋ฐ์€ ๋น›์— ๋ฏผ๊ฐํ•œ ์‚ฌ๋žŒ๋“ค์€ ๋‹คํฌ ๋ชจ๋“œ๊ฐ€ ์—†์œผ๋ฉด ์›น์‚ฌ์ดํŠธ๋ฅผ ์ œ๋Œ€๋กœ ์ด์šฉํ•˜๊ธฐ ์–ด๋ ค์šธ ์ˆ˜ ์žˆ์–ด.
์›น ์ ‘๊ทผ์„ฑ์€ ๋‹จ์ˆœํ•œ ์„ ํƒ์ด ์•„๋‹ˆ๋ผ ๋ชจ๋“  ์‚ฌ์šฉ์ž๋ฅผ ๋ฐฐ๋ คํ•˜๋Š” ํ•„์ˆ˜ ์š”์†Œ์•ผ. ๐ŸŒŸ

Light Mode Dark Mode Eye Comfort Battery Save User Satisfaction

๐Ÿ› ๏ธ ์›Œ๋“œํ”„๋ ˆ์Šค ๋‹คํฌ ๋ชจ๋“œ ๊ตฌํ˜„ ๋ฐฉ๋ฒ•

์ž, ์ด์ œ ๋ณธ๊ฒฉ์ ์œผ๋กœ ์›Œ๋“œํ”„๋ ˆ์Šค์—์„œ ๋‹คํฌ ๋ชจ๋“œ๋ฅผ ๊ตฌํ˜„ํ•˜๋Š” ๋ฐฉ๋ฒ•์„ ์•Œ์•„๋ณด์ž!
ํฌ๊ฒŒ ์„ธ ๊ฐ€์ง€ ๋ฐฉ๋ฒ•์ด ์žˆ์–ด: ํ”Œ๋Ÿฌ๊ทธ์ธ ์‚ฌ์šฉ, ํ…Œ๋งˆ ๊ธฐ๋Šฅ ํ™œ์šฉ, ์ง์ ‘ ์ฝ”๋”ฉ.
๊ฐ๊ฐ์˜ ์žฅ๋‹จ์ ๊ณผ ๊ตฌ์ฒด์ ์ธ ๋ฐฉ๋ฒ•์„ ์‚ดํŽด๋ณผ๊ฒŒ. ๐Ÿš€

๐Ÿ“ฆ ๋ฐฉ๋ฒ• 1: ํ”Œ๋Ÿฌ๊ทธ์ธ ์‚ฌ์šฉํ•˜๊ธฐ (์ดˆ๋ณด์ž ์ถ”์ฒœ)

๊ฐ€์žฅ ์‰ฝ๊ณ  ๋น ๋ฅธ ๋ฐฉ๋ฒ•์ด์•ผ. ์ฝ”๋”ฉ ์ง€์‹์ด ์ „ํ˜€ ์—†์–ด๋„ ๋ช‡ ๋ถ„ ์•ˆ์— ๋‹คํฌ ๋ชจ๋“œ๋ฅผ ์ถ”๊ฐ€ํ•  ์ˆ˜ ์žˆ์–ด.
์›Œ๋“œํ”„๋ ˆ์Šค์˜ ๊ฐ•๋ ฅํ•œ ํ”Œ๋Ÿฌ๊ทธ์ธ ์ƒํƒœ๊ณ„ ๋•๋ถ„์— ๋‹ค์–‘ํ•œ ์„ ํƒ์ง€๊ฐ€ ์žˆ์ง€.

๐ŸŒŸ ์ถ”์ฒœ ํ”Œ๋Ÿฌ๊ทธ์ธ TOP 3

1. WP Dark Mode ๊ฐ€์žฅ ์ธ๊ธฐ ์žˆ๋Š” ๋‹คํฌ ๋ชจ๋“œ ํ”Œ๋Ÿฌ๊ทธ์ธ์ด์•ผ. ๋ฌด๋ฃŒ ๋ฒ„์ „๋งŒ์œผ๋กœ๋„ ์ถฉ๋ถ„ํ•œ ๊ธฐ๋Šฅ์„ ์ œ๊ณตํ•ด.

โœ… ์ฃผ์š” ๊ธฐ๋Šฅ:
โ€ข ์›ํด๋ฆญ ๋‹คํฌ ๋ชจ๋“œ ํ™œ์„ฑํ™”
โ€ข 32๊ฐ€์ง€ ์ด์ƒ์˜ ์‚ฌ์ „ ์ œ์ž‘๋œ ๋‹คํฌ ๋ชจ๋“œ ์Šคํƒ€์ผ
โ€ข ํ”„๋ก ํŠธ์—”๋“œ์™€ ๋ฐฑ์—”๋“œ ๋ชจ๋‘ ์ง€์›
โ€ข ์ž๋™ ๋‹คํฌ ๋ชจ๋“œ (์‹œ๊ฐ„ ๊ธฐ๋ฐ˜, OS ์„ค์ • ๊ธฐ๋ฐ˜)
โ€ข ํŠน์ • ํŽ˜์ด์ง€/ํฌ์ŠคํŠธ ์ œ์™ธ ๊ธฐ๋Šฅ
โ€ข WooCommerce, Elementor ๋“ฑ ์ฃผ์š” ํ”Œ๋Ÿฌ๊ทธ์ธ ํ˜ธํ™˜

๐Ÿ’ฐ ๊ฐ€๊ฒฉ: ๋ฌด๋ฃŒ (ํ”„๋ฆฌ๋ฏธ์—„: $49/๋…„)
โญ ํ‰์ : 4.8/5 (1,000๊ฐœ ์ด์ƒ์˜ ๋ฆฌ๋ทฐ)
2. Darklup ๊ฐ€๋ณ๊ณ  ๋น ๋ฅธ ์„ฑ๋Šฅ์— ์ดˆ์ ์„ ๋งž์ถ˜ ํ”Œ๋Ÿฌ๊ทธ์ธ์ด์•ผ.

โœ… ์ฃผ์š” ๊ธฐ๋Šฅ:
โ€ข ์ดˆ๊ฒฝ๋Ÿ‰ (50KB ๋ฏธ๋งŒ)
โ€ข ํŽ˜์ด์ง€ ๋กœ๋”ฉ ์†๋„์— ๊ฑฐ์˜ ์˜ํ–ฅ ์—†์Œ
โ€ข ๊ฐ„๋‹จํ•œ ํ† ๊ธ€ ์Šค์œ„์น˜
โ€ข ์‚ฌ์šฉ์ž ์„ ํƒ ๊ธฐ์–ต (์ฟ ํ‚ค ๊ธฐ๋ฐ˜)
โ€ข ์ปค์Šคํ…€ CSS ์ง€์›

๐Ÿ’ฐ ๊ฐ€๊ฒฉ: ๋ฌด๋ฃŒ (ํ”„๋ฆฌ๋ฏธ์—„: $29/๋…„)
โญ ํ‰์ : 4.7/5
3. Dark Mode Toggle ์‹ฌํ”Œํ•จ์„ ์ถ”๊ตฌํ•˜๋Š” ์‚ฌ๋žŒ๋“ค์„ ์œ„ํ•œ ํ”Œ๋Ÿฌ๊ทธ์ธ.

โœ… ์ฃผ์š” ๊ธฐ๋Šฅ:
โ€ข ์ตœ์†Œํ•œ์˜ ์„ค์ •
โ€ข ๊น”๋”ํ•œ ํ† ๊ธ€ ๋ฒ„ํŠผ
โ€ข ์œ„์น˜ ์ปค์Šคํ„ฐ๋งˆ์ด์ง• ๊ฐ€๋Šฅ
โ€ข ๋ชจ๋ฐ”์ผ ์ตœ์ ํ™”

๐Ÿ’ฐ ๊ฐ€๊ฒฉ: ์™„์ „ ๋ฌด๋ฃŒ
โญ ํ‰์ : 4.5/5

๐Ÿ”ง WP Dark Mode ์„ค์น˜ ๋ฐ ์„ค์ • ๊ฐ€์ด๋“œ

1 ํ”Œ๋Ÿฌ๊ทธ์ธ ์„ค์น˜

์›Œ๋“œํ”„๋ ˆ์Šค ๊ด€๋ฆฌ์ž ํŽ˜์ด์ง€์—์„œ ํ”Œ๋Ÿฌ๊ทธ์ธ > ์ƒˆ๋กœ ์ถ”๊ฐ€๋กœ ์ด๋™ํ•ด.
๊ฒ€์ƒ‰์ฐฝ์— "WP Dark Mode"๋ฅผ ์ž…๋ ฅํ•˜๊ณ  ์„ค์น˜ ํ›„ ํ™œ์„ฑํ™”!
2 ๊ธฐ๋ณธ ์„ค์ •

WP Dark Mode > Settings ๋ฉ”๋‰ด๋กœ ๋“ค์–ด๊ฐ€๋ฉด ๋Œ€์‹œ๋ณด๋“œ๊ฐ€ ๋‚˜์™€.
์—ฌ๊ธฐ์„œ "Enable Frontend Darkmode"๋ฅผ ์ผœ์ฃผ๋ฉด ๊ธฐ๋ณธ ๋‹คํฌ ๋ชจ๋“œ๊ฐ€ ๋ฐ”๋กœ ์ ์šฉ๋ผ!
3 ์Šคํƒ€์ผ ์ปค์Šคํ„ฐ๋งˆ์ด์ง•

Customization ํƒญ์—์„œ ๋‹คํฌ ๋ชจ๋“œ ์ƒ‰์ƒ์„ ์กฐ์ •ํ•  ์ˆ˜ ์žˆ์–ด.
โ€ข Background Color: ๋ฐฐ๊ฒฝ์ƒ‰ (์ถ”์ฒœ: #1a1a1a ~ #2d2d2d)
โ€ข Text Color: ํ…์ŠคํŠธ ์ƒ‰์ƒ (์ถ”์ฒœ: #e0e0e0 ~ #ffffff)
โ€ข Link Color: ๋งํฌ ์ƒ‰์ƒ (์ถ”์ฒœ: #64b5f6 ~ #90caf9)
โ€ข Selection Color: ํ…์ŠคํŠธ ์„ ํƒ ์ƒ‰์ƒ
4 ์Šค์œ„์น˜ ์œ„์น˜ ์„ค์ •

Switch Settings์—์„œ ๋‹คํฌ ๋ชจ๋“œ ํ† ๊ธ€ ๋ฒ„ํŠผ์˜ ์œ„์น˜๋ฅผ ์ •ํ•ด์ค˜.
โ€ข Floating Switch: ํ™”๋ฉด ๊ตฌ์„์— ๋– ์žˆ๋Š” ๋ฒ„ํŠผ
โ€ข Menu Switch: ๋ฉ”๋‰ด์— ํ†ตํ•ฉ
โ€ข Custom Position: ์›ํ•˜๋Š” ์œ„์น˜์— ์ˆ์ฝ”๋“œ๋กœ ๋ฐฐ์น˜
5 ๊ณ ๊ธ‰ ์„ค์ •

Advanced ํƒญ์—์„œ ์„ธ๋ฐ€ํ•œ ์กฐ์ •์ด ๊ฐ€๋Šฅํ•ด.
โ€ข Time Based: ํŠน์ • ์‹œ๊ฐ„๋Œ€์— ์ž๋™์œผ๋กœ ๋‹คํฌ ๋ชจ๋“œ ํ™œ์„ฑํ™”
โ€ข OS Aware: ์‚ฌ์šฉ์ž์˜ ์šด์˜์ฒด์ œ ์„ค์ •์„ ๋”ฐ๋ฆ„
โ€ข Excludes: ํŠน์ • ํŽ˜์ด์ง€๋‚˜ ์š”์†Œ๋ฅผ ๋‹คํฌ ๋ชจ๋“œ์—์„œ ์ œ์™ธ
โ€ข Image Settings: ์ด๋ฏธ์ง€ ๋ฐ๊ธฐ ์ž๋™ ์กฐ์ •
โœจ ํ”„๋กœ ํŒ: ๋‹คํฌ ๋ชจ๋“œ๋ฅผ ์ฒ˜์Œ ์ ์šฉํ•  ๋•Œ๋Š” "OS Aware" ์˜ต์…˜์„ ์ผœ๋Š” ๊ฑธ ์ถ”์ฒœํ•ด. ์‚ฌ์šฉ์ž์˜ ์‹œ์Šคํ…œ ์„ค์ •์„ ์กด์ค‘ํ•˜๋ฉด์„œ ์ž์—ฐ์Šค๋Ÿฌ์šด ๊ฒฝํ—˜์„ ์ œ๊ณตํ•  ์ˆ˜ ์žˆ๊ฑฐ๋“ !

๐ŸŽจ ๋ฐฉ๋ฒ• 2: ํ…Œ๋งˆ ๊ธฐ๋Šฅ ํ™œ์šฉํ•˜๊ธฐ

์ตœ๊ทผ ์ถœ์‹œ๋˜๋Š” ํ”„๋ฆฌ๋ฏธ์—„ ์›Œ๋“œํ”„๋ ˆ์Šค ํ…Œ๋งˆ๋“ค์€ ๋‹คํฌ ๋ชจ๋“œ๋ฅผ ๊ธฐ๋ณธ ๊ธฐ๋Šฅ์œผ๋กœ ์ œ๊ณตํ•˜๋Š” ๊ฒฝ์šฐ๊ฐ€ ๋งŽ์•„.
๋งŒ์•ฝ ๋„ค๊ฐ€ ์‚ฌ์šฉํ•˜๋Š” ํ…Œ๋งˆ์— ๋‹คํฌ ๋ชจ๋“œ ๊ธฐ๋Šฅ์ด ์žˆ๋‹ค๋ฉด, ํ”Œ๋Ÿฌ๊ทธ์ธ ์—†์ด๋„ ๊ตฌํ˜„ํ•  ์ˆ˜ ์žˆ์–ด!

๐Ÿ” ํ…Œ๋งˆ ๋‹คํฌ ๋ชจ๋“œ ์ง€์› ํ™•์ธํ•˜๊ธฐ

ํ™•์ธ ๋ฐฉ๋ฒ•: 1. ์™ธ๋ชจ > ํ…Œ๋งˆ ์˜ต์…˜ ๋˜๋Š” ์™ธ๋ชจ > ์‚ฌ์šฉ์ž ์ •์˜ํ•˜๊ธฐ์—์„œ "Dark Mode", "Color Scheme", "Night Mode" ๊ฐ™์€ ์˜ต์…˜์„ ์ฐพ์•„๋ด.

2. ํ…Œ๋งˆ ๋ฌธ์„œ(Documentation)๋ฅผ ํ™•์ธํ•ด. ๋Œ€๋ถ€๋ถ„์˜ ํ”„๋ฆฌ๋ฏธ์—„ ํ…Œ๋งˆ๋Š” ์ƒ์„ธํ•œ ๊ฐ€์ด๋“œ๋ฅผ ์ œ๊ณตํ•ด.

3. ํ…Œ๋งˆ ๊ฐœ๋ฐœ์ž์—๊ฒŒ ์ง์ ‘ ๋ฌธ์˜ํ•ด๋„ ๋ผ.

๐ŸŒŸ ๋‹คํฌ ๋ชจ๋“œ๋ฅผ ๊ธฐ๋ณธ ์ง€์›ํ•˜๋Š” ์ธ๊ธฐ ํ…Œ๋งˆ

โ€ข Astra Pro ๊ฐ€๋ณ๊ณ  ๋น ๋ฅธ ํ…Œ๋งˆ๋กœ ์œ ๋ช…ํ•ด. ๋‹คํฌ ๋ชจ๋“œ ์„ค์ •์ด ๋งค์šฐ ์ง๊ด€์ ์ด์•ผ.
์™ธ๋ชจ > ์‚ฌ์šฉ์ž ์ •์˜ํ•˜๊ธฐ > Global > Colors์—์„œ Dark Mode Palette๋ฅผ ์„ค์ •ํ•  ์ˆ˜ ์žˆ์–ด.

โ€ข GeneratePress Premium
๊ฐœ๋ฐœ์ž๋“ค์ด ์‚ฌ๋ž‘ํ•˜๋Š” ํ…Œ๋งˆ. ๋‹คํฌ ๋ชจ๋“œ ์ปค์Šคํ„ฐ๋งˆ์ด์ง• ์ž์œ ๋„๊ฐ€ ๋†’์•„.
Elements ๊ธฐ๋Šฅ์„ ์‚ฌ์šฉํ•ด์„œ ์กฐ๊ฑด๋ถ€ ๋‹คํฌ ๋ชจ๋“œ ์Šคํƒ€์ผ๋„ ์ ์šฉ ๊ฐ€๋Šฅํ•ด.

โ€ข Kadence Theme
์ตœ์‹  ํŠธ๋ Œ๋“œ๋ฅผ ๋ฐ˜์˜ํ•œ ํ…Œ๋งˆ. ๋‹คํฌ ๋ชจ๋“œ๊ฐ€ ๋งค์šฐ ์„ธ๋ จ๋˜๊ฒŒ ๊ตฌํ˜„๋˜์–ด ์žˆ์–ด.
์ƒ‰์ƒ ํŒ”๋ ˆํŠธ๋ฅผ ๋ผ์ดํŠธ/๋‹คํฌ ๋ชจ๋“œ๋ณ„๋กœ ๋”ฐ๋กœ ์„ค์ •ํ•  ์ˆ˜ ์žˆ์–ด.

โ€ข OceanWP
๋ฌด๋ฃŒ ํ…Œ๋งˆ์ง€๋งŒ ๋‹คํฌ ๋ชจ๋“œ ํ™•์žฅ ๊ธฐ๋Šฅ์„ ์ œ๊ณตํ•ด.
Ocean Extra ํ”Œ๋Ÿฌ๊ทธ์ธ๊ณผ ํ•จ๊ป˜ ์‚ฌ์šฉํ•˜๋ฉด ๋” ๋งŽ์€ ์˜ต์…˜์„ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ์–ด.

๐Ÿ’ป ๋ฐฉ๋ฒ• 3: ์ง์ ‘ ์ฝ”๋”ฉํ•˜๊ธฐ (๊ฐœ๋ฐœ์ž์šฉ)

์™„์ „ํ•œ ์ปค์Šคํ„ฐ๋งˆ์ด์ง•์„ ์›ํ•œ๋‹ค๋ฉด ์ง์ ‘ ์ฝ”๋”ฉํ•˜๋Š” ๊ฒŒ ์ตœ๊ณ ์•ผ.
CSS ๋ณ€์ˆ˜์™€ JavaScript๋ฅผ ํ™œ์šฉํ•˜๋ฉด ์ƒ๊ฐ๋ณด๋‹ค ๊ฐ„๋‹จํ•˜๊ฒŒ ๊ตฌํ˜„ํ•  ์ˆ˜ ์žˆ์–ด.
์ด ๋ฐฉ๋ฒ•์€ ํ”Œ๋Ÿฌ๊ทธ์ธ ์˜์กด์„ฑ์„ ์ค„์ด๊ณ , ์‚ฌ์ดํŠธ ์„ฑ๋Šฅ์„ ์ตœ์ ํ™”ํ•  ์ˆ˜ ์žˆ๋‹ค๋Š” ์žฅ์ ์ด ์žˆ์ง€. ๐ŸŽฏ

๐Ÿ“ ๊ธฐ๋ณธ ๊ตฌ์กฐ ์ดํ•ดํ•˜๊ธฐ

๋‹คํฌ ๋ชจ๋“œ ๊ตฌํ˜„์˜ ํ•ต์‹ฌ์€ ์„ธ ๊ฐ€์ง€์•ผ:
1. CSS ๋ณ€์ˆ˜๋กœ ์ƒ‰์ƒ ์ฒด๊ณ„ ์ •์˜
2. JavaScript๋กœ ๋ชจ๋“œ ์ „ํ™˜ ๊ธฐ๋Šฅ ๊ตฌํ˜„
3. LocalStorage๋กœ ์‚ฌ์šฉ์ž ์„ ํƒ ์ €์žฅ

โš ๏ธ ์ฃผ์˜์‚ฌํ•ญ: ์ง์ ‘ ์ฝ”๋”ฉํ•  ๋•Œ๋Š” ์ฐจ์ผ๋“œ ํ…Œ๋งˆ๋ฅผ ์‚ฌ์šฉํ•˜๋Š” ๊ฑธ ๊ฐ•๋ ฅํžˆ ์ถ”์ฒœํ•ด! ๋ถ€๋ชจ ํ…Œ๋งˆ๊ฐ€ ์—…๋ฐ์ดํŠธ๋˜๋ฉด ๋„ค๊ฐ€ ์ž‘์„ฑํ•œ ์ฝ”๋“œ๊ฐ€ ๋‚ ์•„๊ฐˆ ์ˆ˜ ์žˆ๊ฑฐ๋“ .

๐ŸŽจ Step 1: CSS ๋ณ€์ˆ˜ ์„ค์ •

๋จผ์ € style.css ํŒŒ์ผ์— CSS ๋ณ€์ˆ˜๋ฅผ ์ •์˜ํ•ด์ค˜.
์ด๋ ‡๊ฒŒ ํ•˜๋ฉด ๋‚˜์ค‘์— ์ƒ‰์ƒ์„ ๋ณ€๊ฒฝํ•  ๋•Œ ํ•œ ๊ณณ๋งŒ ์ˆ˜์ •ํ•˜๋ฉด ๋ผ์„œ ๊ด€๋ฆฌ๊ฐ€ ํŽธํ•ด.

/* ๋ผ์ดํŠธ ๋ชจ๋“œ (๊ธฐ๋ณธ) */
:root {
  --bg-primary: #ffffff;
  --bg-secondary: #f8f9fa;
  --text-primary: #212529;
  --text-secondary: #6c757d;
  --border-color: #dee2e6;
  --link-color: #0d6efd;
  --link-hover: #0a58ca;
  --shadow: rgba(0, 0, 0, 0.1);
}

/* ๋‹คํฌ ๋ชจ๋“œ */
[data-theme="dark"] {
  --bg-primary: #1a1a1a;
  --bg-secondary: #2d2d2d;
  --text-primary: #e0e0e0;
  --text-secondary: #a0a0a0;
  --border-color: #404040;
  --link-color: #64b5f6;
  --link-hover: #90caf9;
  --shadow: rgba(0, 0, 0, 0.5);
}

/* ๋ณ€์ˆ˜ ์ ์šฉ */
body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  transition: background-color 0.3s ease, color 0.3s ease;
}

.container {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  box-shadow: 0 2px 8px var(--shadow);
}

a {
  color: var(--link-color);
  transition: color 0.2s ease;
}

a:hover {
  color: var(--link-hover);
}

h1, h2, h3, h4, h5, h6 {
  color: var(--text-primary);
}

p {
  color: var(--text-secondary);
}
๐Ÿ’ก CSS ๋ณ€์ˆ˜ ๋„ค์ด๋ฐ ํŒ: ๋ณ€์ˆ˜๋ช…์„ ์˜๋ฏธ๋ก ์ ์œผ๋กœ ์ง€์œผ๋ฉด ๋‚˜์ค‘์— ์œ ์ง€๋ณด์ˆ˜๊ฐ€ ํ›จ์”ฌ ์‰ฌ์›Œ์ ธ. --color-blue๋ณด๋‹ค๋Š” --link-color์ฒ˜๋Ÿผ ์šฉ๋„๋ฅผ ๋ช…ํ™•ํžˆ ํ•˜๋Š” ๊ฒŒ ์ข‹์•„!

โšก Step 2: JavaScript ํ† ๊ธ€ ๊ธฐ๋Šฅ

์ด์ œ ๋‹คํฌ ๋ชจ๋“œ๋ฅผ ์ผœ๊ณ  ๋Œ ์ˆ˜ ์žˆ๋Š” JavaScript ์ฝ”๋“œ๋ฅผ ์ž‘์„ฑํ•ด๋ณด์ž.
functions.php ํŒŒ์ผ์— ์Šคํฌ๋ฆฝํŠธ๋ฅผ ์ถ”๊ฐ€ํ•˜๊ฑฐ๋‚˜, ๋ณ„๋„์˜ JS ํŒŒ์ผ์„ ๋งŒ๋“ค์–ด์„œ enqueue ํ•ด์ค˜.

// ๋‹คํฌ ๋ชจ๋“œ ํ† ๊ธ€ ์Šคํฌ๋ฆฝํŠธ
(function() {
  // ์ €์žฅ๋œ ํ…Œ๋งˆ ๋ถˆ๋Ÿฌ์˜ค๊ธฐ ๋˜๋Š” ์‹œ์Šคํ…œ ์„ค์ • ํ™•์ธ
  const getPreferredTheme = () => {
    const savedTheme = localStorage.getItem('theme');
    if (savedTheme) {
      return savedTheme;
    }
    // ์‹œ์Šคํ…œ ๋‹คํฌ ๋ชจ๋“œ ์„ค์ • ํ™•์ธ
    return window.matchMedia('(prefers-color-scheme: dark)').matches 
      ? 'dark' 
      : 'light';
  };

  // ํ…Œ๋งˆ ์ ์šฉ
  const setTheme = (theme) => {
    document.documentElement.setAttribute('data-theme', theme);
    localStorage.setItem('theme', theme);
    
    // ํ† ๊ธ€ ๋ฒ„ํŠผ ์•„์ด์ฝ˜ ์—…๋ฐ์ดํŠธ
    const toggleBtn = document.getElementById('theme-toggle');
    if (toggleBtn) {
      toggleBtn.innerHTML = theme === 'dark' 
        ? 'โ˜€๏ธ' 
        : '๐ŸŒ™';
      toggleBtn.setAttribute('aria-label', 
        theme === 'dark' 
          ? 'Switch to light mode' 
          : 'Switch to dark mode'
      );
    }
  };

  // ํŽ˜์ด์ง€ ๋กœ๋“œ ์‹œ ํ…Œ๋งˆ ์ ์šฉ (๊นœ๋นก์ž„ ๋ฐฉ์ง€)
  setTheme(getPreferredTheme());

  // DOM ๋กœ๋“œ ํ›„ ์ด๋ฒคํŠธ ๋ฆฌ์Šค๋„ˆ ์ถ”๊ฐ€
  document.addEventListener('DOMContentLoaded', () => {
    const toggleBtn = document.getElementById('theme-toggle');
    
    if (toggleBtn) {
      toggleBtn.addEventListener('click', () => {
        const currentTheme = document.documentElement.getAttribute('data-theme');
        const newTheme = currentTheme === 'dark' ? 'light' : 'dark';
        setTheme(newTheme);
      });
    }
  });

  // ์‹œ์Šคํ…œ ํ…Œ๋งˆ ๋ณ€๊ฒฝ ๊ฐ์ง€
  window.matchMedia('(prefers-color-scheme: dark)')
    .addEventListener('change', (e) => {
      if (!localStorage.getItem('theme')) {
        setTheme(e.matches ? 'dark' : 'light');
      }
    });
})();

๐Ÿ”˜ Step 3: ํ† ๊ธ€ ๋ฒ„ํŠผ ์ถ”๊ฐ€

์‚ฌ์šฉ์ž๊ฐ€ ํด๋ฆญํ•  ์ˆ˜ ์žˆ๋Š” ํ† ๊ธ€ ๋ฒ„ํŠผ์„ ๋งŒ๋“ค์–ด์•ผ ํ•ด.
header.php๋‚˜ ์›ํ•˜๋Š” ์œ„์น˜์— ๋ฒ„ํŠผ์„ ์ถ”๊ฐ€ํ•ด์ค˜.

<!-- HTML: ํ† ๊ธ€ ๋ฒ„ํŠผ -->
<button id="theme-toggle" 
        class="theme-toggle-btn" 
        aria-label="Toggle dark mode"
        type="button">
  ๐ŸŒ™
</button>

<!-- CSS: ๋ฒ„ํŠผ ์Šคํƒ€์ผ -->
<style>
.theme-toggle-btn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 2px solid var(--border-color);
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  font-size: 24px;
  cursor: pointer;
  box-shadow: 0 4px 12px var(--shadow);
  transition: all 0.3s ease;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.theme-toggle-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 16px var(--shadow);
}

.theme-toggle-btn:active {
  transform: scale(0.95);
}

/* ๋ชจ๋ฐ”์ผ ์ตœ์ ํ™” */
@media (max-width: 768px) {
  .theme-toggle-btn {
    bottom: 15px;
    right: 15px;
    width: 45px;
    height: 45px;
    font-size: 20px;
  }
}
</style>

๐Ÿ”ง Step 4: functions.php์— ์Šคํฌ๋ฆฝํŠธ ๋“ฑ๋ก

์›Œ๋“œํ”„๋ ˆ์Šค ๋ฐฉ์‹์œผ๋กœ ์Šคํฌ๋ฆฝํŠธ๋ฅผ ์ œ๋Œ€๋กœ ๋“ฑ๋กํ•ด์ค˜์•ผ ํ•ด.
์ฐจ์ผ๋“œ ํ…Œ๋งˆ์˜ functions.php์— ๋‹ค์Œ ์ฝ”๋“œ๋ฅผ ์ถ”๊ฐ€ํ•ด.

function enqueue_dark_mode_script() {
  // CSS ํŒŒ์ผ ๋“ฑ๋ก
  wp_enqueue_style(
    'dark-mode-styles',
    get_stylesheet_directory_uri() . '/dark-mode.css',
    array(),
    '1.0.0'
  );
  
  // JavaScript ํŒŒ์ผ ๋“ฑ๋ก
  wp_enqueue_script(
    'dark-mode-toggle',
    get_stylesheet_directory_uri() . '/dark-mode.js',
    array(),
    '1.0.0',
    true
  );
}
add_action('wp_enqueue_scripts', 'enqueue_dark_mode_script');

// ํ† ๊ธ€ ๋ฒ„ํŠผ์„ footer์— ์ž๋™ ์ถ”๊ฐ€
function add_dark_mode_toggle() {
  echo '<button id="theme-toggle" class="theme-toggle-btn" aria-label="Toggle dark mode" type="button">๐ŸŒ™</button>';
}
add_action('wp_footer', 'add_dark_mode_toggle');
๐ŸŽ‰ ์™„์„ฑ! ์ด์ œ ๋„ค ์›Œ๋“œํ”„๋ ˆ์Šค ์‚ฌ์ดํŠธ์— ์™„์ „ํžˆ ์ปค์Šคํ„ฐ๋งˆ์ด์ง• ๊ฐ€๋Šฅํ•œ ๋‹คํฌ ๋ชจ๋“œ๊ฐ€ ๊ตฌํ˜„๋์–ด! ํ”Œ๋Ÿฌ๊ทธ์ธ ์—†์ด ๊น”๋”ํ•˜๊ฒŒ ์ž‘๋™ํ•˜๋Š” ๋‹คํฌ ๋ชจ๋“œ๋ฅผ ๋งŒ๋“  ๊ฑฐ์•ผ.

๐ŸŽจ ๋‹คํฌ ๋ชจ๋“œ ๋””์ž์ธ ๋ฒ ์ŠคํŠธ ํ”„๋ž™ํ‹ฐ์Šค

๋‹คํฌ ๋ชจ๋“œ๋ฅผ ๊ตฌํ˜„ํ–ˆ๋‹ค๊ณ  ๋์ด ์•„๋‹ˆ์•ผ. ์ œ๋Œ€๋กœ ๋œ ๋‹คํฌ ๋ชจ๋“œ๋Š” ๋‹จ์ˆœํžˆ ์ƒ‰์„ ๋ฐ˜์ „์‹œํ‚ค๋Š” ๊ฒŒ ์•„๋‹ˆ๋ผ,
์‚ฌ์šฉ์ž ๊ฒฝํ—˜์„ ๊ณ ๋ คํ•œ ์„ธ์‹ฌํ•œ ๋””์ž์ธ์ด ํ•„์š”ํ•ด. ๊ตฌ๊ธ€, ์• ํ”Œ, ๋งˆ์ดํฌ๋กœ์†Œํ”„ํŠธ ๊ฐ™์€ ๋Œ€๊ธฐ์—…๋“ค์ด
์ˆ˜๋…„๊ฐ„ ์—ฐ๊ตฌํ•œ ๋‹คํฌ ๋ชจ๋“œ ๋””์ž์ธ ์›์น™๋“ค์„ ์•Œ์•„๋ณด์ž! ๐ŸŽฏ

๐ŸŒˆ ์ƒ‰์ƒ ์„ ํƒ์˜ ๊ณผํ•™

1. ์ˆœ์ˆ˜ํ•œ ๊ฒ€์€์ƒ‰์€ ํ”ผํ•˜์ž

โŒ ๋‚˜์œ ์˜ˆ: background: #000000; โœ… ์ข‹์€ ์˜ˆ: background: #121212; ~ #1a1a1a;

์ด์œ :
์ˆœ์ˆ˜ํ•œ ๊ฒ€์€์ƒ‰(#000000)์€ ๋ˆˆ์— ๋„ˆ๋ฌด ๊ฐ•ํ•œ ๋Œ€๋น„๋ฅผ ๋งŒ๋“ค์–ด์„œ ์˜คํžˆ๋ ค ํ”ผ๋กœ๋„๋ฅผ ๋†’์—ฌ.
์•ฝ๊ฐ„ ๋ฐ์€ ์–ด๋‘์šด ํšŒ์ƒ‰์„ ์‚ฌ์šฉํ•˜๋ฉด ๋ˆˆ์ด ํ›จ์”ฌ ํŽธ์•ˆํ•ด์ง€๊ณ , ๊นŠ์ด๊ฐ๋„ ํ‘œํ˜„ํ•  ์ˆ˜ ์žˆ์–ด.
๊ตฌ๊ธ€ ๋จธํ‹ฐ๋ฆฌ์–ผ ๋””์ž์ธ์—์„œ๋Š” #121212๋ฅผ ๊ธฐ๋ณธ ๋‹คํฌ ๋ฐฐ๊ฒฝ์œผ๋กœ ๊ถŒ์žฅํ•˜๊ณ  ์žˆ์–ด.

2. ํ…์ŠคํŠธ ์ƒ‰์ƒ ์ตœ์ ํ™”

๋ช…์•”๋น„(Contrast Ratio) ๊ฐ€์ด๋“œ: โ€ข ๋ณธ๋ฌธ ํ…์ŠคํŠธ: ์ตœ์†Œ 7:1 (WCAG AAA ๊ธฐ์ค€)
โ€ข ํฐ ํ…์ŠคํŠธ: ์ตœ์†Œ 4.5:1 (WCAG AA ๊ธฐ์ค€)
โ€ข ๋ณด์กฐ ํ…์ŠคํŠธ: ์ตœ์†Œ 4.5:1

์ถ”์ฒœ ์ƒ‰์ƒ:
โ€ข ์ฃผ ํ…์ŠคํŠธ: #e0e0e0 ~ #f5f5f5
โ€ข ๋ณด์กฐ ํ…์ŠคํŠธ: #a0a0a0 ~ #b0b0b0
โ€ข ๋น„ํ™œ์„ฑ ํ…์ŠคํŠธ: #6c6c6c ~ #808080

๐Ÿ’ก ์ˆœ์ˆ˜ํ•œ ํฐ์ƒ‰(#ffffff)์€ ๋‹คํฌ ๋ชจ๋“œ์—์„œ ๋„ˆ๋ฌด ๋ฐ์•„์„œ ๋ˆˆ์ด ๋ถ€์‹ค ์ˆ˜ ์žˆ์–ด. ์•ฝ๊ฐ„ ์–ด๋‘์šด ํฐ์ƒ‰์„ ์‚ฌ์šฉํ•˜๋Š” ๊ฒŒ ์ข‹์•„!

3. ์ƒ‰์ƒ ์ฑ„๋„ ์กฐ์ •

๋ผ์ดํŠธ ๋ชจ๋“œ์—์„œ ์‚ฌ์šฉํ•˜๋˜ ๋ฐ๊ณ  ์„ ๋ช…ํ•œ ์ƒ‰์ƒ์„ ๋‹คํฌ ๋ชจ๋“œ์—์„œ ๊ทธ๋Œ€๋กœ ์‚ฌ์šฉํ•˜๋ฉด ๋„ˆ๋ฌด ํŠ€์–ด ๋ณด์—ฌ.
๋‹คํฌ ๋ชจ๋“œ์—์„œ๋Š” ์ฑ„๋„๋ฅผ ๋‚ฎ์ถ”๊ณ  ๋ฐ๊ธฐ๋ฅผ ์กฐ์ •ํ•ด์•ผ ํ•ด.

์ƒ‰์ƒ ์šฉ๋„ ๋ผ์ดํŠธ ๋ชจ๋“œ ๋‹คํฌ ๋ชจ๋“œ ์กฐ์ • ๋ฐฉ๋ฒ•
Primary ๋ฒ„ํŠผ #0d6efd #64b5f6 ๋ฐ๊ธฐ +30%, ์ฑ„๋„ -10%
Success ์ƒ‰์ƒ #198754 #4caf50 ๋ฐ๊ธฐ +40%, ์ฑ„๋„ -15%
Warning ์ƒ‰์ƒ #ffc107 #ffb74d ๋ฐ๊ธฐ -10%, ์ฑ„๋„ -20%
Danger ์ƒ‰์ƒ #dc3545 #ef5350 ๋ฐ๊ธฐ +20%, ์ฑ„๋„ -10%

๐Ÿ“ ๋ ˆ์ด์•„์›ƒ๊ณผ ๊นŠ์ด๊ฐ

Elevation (๊ณ ๋„) ์‹œ์Šคํ…œ

๋‹คํฌ ๋ชจ๋“œ์—์„œ๋Š” ๊ทธ๋ฆผ์ž ๋Œ€์‹  ๋ฐ๊ธฐ๋กœ ๊นŠ์ด๋ฅผ ํ‘œํ˜„ํ•ด.
์š”์†Œ๊ฐ€ ์œ„๋กœ ์˜ฌ๋ผ์˜ฌ์ˆ˜๋ก ๋ฐฐ๊ฒฝ์„ ์กฐ๊ธˆ์”ฉ ๋ฐ๊ฒŒ ๋งŒ๋“œ๋Š” ๊ฑฐ์•ผ.

๋จธํ‹ฐ๋ฆฌ์–ผ ๋””์ž์ธ Elevation ๊ฐ€์ด๋“œ: Level 0 (๋ฐ”๋‹ฅ): #121212
Level 1 (์นด๋“œ): #1e1e1e
Level 2 (์•ฑ๋ฐ”): #232323
Level 3 (๋ฉ”๋‰ด): #252525
Level 4 (๋ชจ๋‹ฌ): #272727

๊ฐ ๋ ˆ๋ฒจ๋งˆ๋‹ค ์•ฝ 5% ์ •๋„์”ฉ ๋ฐ๊ธฐ๋ฅผ ๋†’์—ฌ์ฃผ๋ฉด ์ž์—ฐ์Šค๋Ÿฌ์šด ๊นŠ์ด๊ฐ์ด ์ƒ๊ฒจ.
/* Elevation ์‹œ์Šคํ…œ CSS ์˜ˆ์ œ */
.surface-level-0 {
  background-color: #121212;
}

.surface-level-1 {
  background-color: #1e1e1e;
  /* ์นด๋“œ, ํŒจ๋„ ๋“ฑ */
}

.surface-level-2 {
  background-color: #232323;
  /* ํ—ค๋”, ๋„ค๋น„๊ฒŒ์ด์…˜ ๋ฐ” */
}

.surface-level-3 {
  background-color: #252525;
  /* ๋“œ๋กญ๋‹ค์šด ๋ฉ”๋‰ด, ํŒ์—… */
}

.surface-level-4 {
  background-color: #272727;
  /* ๋ชจ๋‹ฌ, ๋‹ค์ด์–ผ๋กœ๊ทธ */
}

๐Ÿ–ผ๏ธ ์ด๋ฏธ์ง€์™€ ๋ฏธ๋””์–ด ์ฒ˜๋ฆฌ

์ด๋ฏธ์ง€ ๋ฐ๊ธฐ ์ž๋™ ์กฐ์ •

๋‹คํฌ ๋ชจ๋“œ์—์„œ ๋ฐ์€ ์ด๋ฏธ์ง€๋Š” ๋ˆˆ์— ๋ถ€๋‹ด์„ ์ค„ ์ˆ˜ ์žˆ์–ด.
CSS ํ•„ํ„ฐ๋ฅผ ์‚ฌ์šฉํ•ด์„œ ์ด๋ฏธ์ง€ ๋ฐ๊ธฐ๋ฅผ ์ž๋™์œผ๋กœ ์กฐ์ •ํ•ด๋ณด์ž.

/* ๋‹คํฌ ๋ชจ๋“œ์—์„œ ์ด๋ฏธ์ง€ ๋ฐ๊ธฐ ์กฐ์ • */
[data-theme="dark"] img {
  filter: brightness(0.8) contrast(1.1);
  transition: filter 0.3s ease;
}

/* ๋กœ๊ณ ๋‚˜ ์•„์ด์ฝ˜์€ ์ œ์™ธ */
[data-theme="dark"] .logo,
[data-theme="dark"] .icon {
  filter: none;
}

/* ํ˜ธ๋ฒ„ ์‹œ ์›๋ž˜ ๋ฐ๊ธฐ๋กœ */
[data-theme="dark"] img:hover {
  filter: brightness(1) contrast(1);
}

/* ๋น„๋””์˜ค๋„ ๋™์ผํ•˜๊ฒŒ */
[data-theme="dark"] video {
  filter: brightness(0.85) contrast(1.05);
}
๐Ÿ’ก ํ”„๋กœ ํŒ: ์ œํ’ˆ ์‚ฌ์ง„์ด๋‚˜ ์ค‘์š”ํ•œ ์ด๋ฏธ์ง€๋Š” ๋‹คํฌ ๋ชจ๋“œ ์ „์šฉ ๋ฒ„์ „์„ ๋”ฐ๋กœ ์ค€๋น„ํ•˜๋Š” ๊ฒŒ ๊ฐ€์žฅ ์ข‹์•„. <picture> ํƒœ๊ทธ๋ฅผ ์‚ฌ์šฉํ•˜๋ฉด ๋ฏธ๋””์–ด ์ฟผ๋ฆฌ๋กœ ์ž๋™ ์ „ํ™˜ํ•  ์ˆ˜ ์žˆ์–ด!

SVG ์•„์ด์ฝ˜ ์ƒ‰์ƒ ์ฒ˜๋ฆฌ

/* SVG ์•„์ด์ฝ˜ ์ƒ‰์ƒ ์ž๋™ ๋ณ€๊ฒฝ */
[data-theme="dark"] svg {
  fill: var(--text-primary);
  stroke: var(--text-primary);
}

/* ์ปฌ๋Ÿฌ ์•„์ด์ฝ˜์€ ์ œ์™ธ */
[data-theme="dark"] .color-icon {
  fill: currentColor;
}

/* ํŠน์ • ์•„์ด์ฝ˜๋งŒ ์ƒ‰์ƒ ์œ ์ง€ */
[data-theme="dark"] .brand-icon {
  fill: none;
  stroke: none;
}

โšก ์„ฑ๋Šฅ ์ตœ์ ํ™”

1. ์ „ํ™˜ ์• ๋‹ˆ๋ฉ”์ด์…˜ ์ตœ์ ํ™”

๋‹คํฌ ๋ชจ๋“œ ์ „ํ™˜ ์‹œ ๋ถ€๋“œ๋Ÿฌ์šด ์• ๋‹ˆ๋ฉ”์ด์…˜์€ ์ข‹์ง€๋งŒ, ๋„ˆ๋ฌด ๋งŽ์€ ์š”์†Œ์— transition์„ ์ ์šฉํ•˜๋ฉด
์„ฑ๋Šฅ ๋ฌธ์ œ๊ฐ€ ์ƒ๊ธธ ์ˆ˜ ์žˆ์–ด. ๊ผญ ํ•„์š”ํ•œ ์†์„ฑ๋งŒ ์• ๋‹ˆ๋ฉ”์ด์…˜ ์ฒ˜๋ฆฌํ•˜์ž.

/* โŒ ๋‚˜์œ ์˜ˆ: ๋ชจ๋“  ์†์„ฑ ์• ๋‹ˆ๋ฉ”์ด์…˜ */
* {
  transition: all 0.3s ease;
}

/* โœ… ์ข‹์€ ์˜ˆ: ํ•„์š”ํ•œ ์†์„ฑ๋งŒ */
body {
  transition: background-color 0.3s ease, color 0.3s ease;
}

.card {
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

a {
  transition: color 0.2s ease;
}

2. ๊นœ๋นก์ž„ ๋ฐฉ์ง€ (FOUC ๋ฐฉ์ง€)

ํŽ˜์ด์ง€ ๋กœ๋“œ ์‹œ ๋ผ์ดํŠธ ๋ชจ๋“œ๊ฐ€ ์ž ๊น ๋ณด์˜€๋‹ค๊ฐ€ ๋‹คํฌ ๋ชจ๋“œ๋กœ ๋ฐ”๋€Œ๋Š” ๊นœ๋นก์ž„์„ ๋ฐฉ์ง€ํ•ด์•ผ ํ•ด.
์ด๊ฑธ FOUC(Flash of Unstyled Content)๋ผ๊ณ  ํ•˜๋Š”๋ฐ, ํ•ด๊ฒฐ ๋ฐฉ๋ฒ•์€ ๊ฐ„๋‹จํ•ด.

<!-- head ํƒœ๊ทธ ์•ˆ์— ์ธ๋ผ์ธ ์Šคํฌ๋ฆฝํŠธ ์ถ”๊ฐ€ -->
<script>
(function() {
  const theme = localStorage.getItem('theme') || 
    (window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light');
  document.documentElement.setAttribute('data-theme', theme);
})();
</script>
โš ๏ธ ์ค‘์š”: ์ด ์Šคํฌ๋ฆฝํŠธ๋Š” ๋ฐ˜๋“œ์‹œ <head> ํƒœ๊ทธ ์•ˆ์—, ๊ทธ๊ฒƒ๋„ ๊ฐ€๋Šฅํ•œ ํ•œ ์œ„์ชฝ์— ๋ฐฐ์น˜ํ•ด์•ผ ํ•ด. CSS๊ฐ€ ๋กœ๋“œ๋˜๊ธฐ ์ „์— ์‹คํ–‰๋˜์–ด์•ผ ๊นœ๋นก์ž„์„ ์™„์ „ํžˆ ๋ฐฉ์ง€ํ•  ์ˆ˜ ์žˆ๊ฑฐ๋“ !

3. CSS ๋ณ€์ˆ˜ ํด๋ฐฑ

์˜ค๋ž˜๋œ ๋ธŒ๋ผ์šฐ์ €๋Š” CSS ๋ณ€์ˆ˜๋ฅผ ์ง€์›ํ•˜์ง€ ์•Š์„ ์ˆ˜ ์žˆ์–ด.
ํด๋ฐฑ ๊ฐ’์„ ์ œ๊ณตํ•ด์„œ ํ˜ธํ™˜์„ฑ์„ ๋†’์ด์ž.

/* ํด๋ฐฑ ๊ฐ’ ์ œ๊ณต */
body {
  background-color: #ffffff; /* ํด๋ฐฑ */
  background-color: var(--bg-primary);
  
  color: #212529; /* ํด๋ฐฑ */
  color: var(--text-primary);
}

/* @supports๋กœ ๊ธฐ๋Šฅ ๊ฐ์ง€ */
@supports not (--css: variables) {
  body {
    background-color: #ffffff;
    color: #212529;
  }
  
  [data-theme="dark"] body {
    background-color: #1a1a1a;
    color: #e0e0e0;
  }
}
Dark Mode Design Principles ๐ŸŽจ Color Harmony Use soft grays instead of pure black #121212 #1e1e1e #2d2d2d ๐Ÿ“ Elevation System Create depth with brightness levels Level 0 Level 1 Level 2 Level 3 โšก Performance Optimize transitions and prevent FOUC โœ“ Fast Loading โœ“ Smooth Transition

๐Ÿ”ง ๊ณ ๊ธ‰ ๊ธฐ๋Šฅ ๊ตฌํ˜„ํ•˜๊ธฐ

๊ธฐ๋ณธ์ ์ธ ๋‹คํฌ ๋ชจ๋“œ ๊ตฌํ˜„์„ ๋งˆ์ณค๋‹ค๋ฉด, ์ด์ œ ์‚ฌ์šฉ์ž ๊ฒฝํ—˜์„ ํ•œ ๋‹จ๊ณ„ ๋” ๋†’์—ฌ์ค„
๊ณ ๊ธ‰ ๊ธฐ๋Šฅ๋“ค์„ ์ถ”๊ฐ€ํ•ด๋ณด์ž! ์ด๋Ÿฐ ๊ธฐ๋Šฅ๋“ค์ด ์žˆ์œผ๋ฉด ๋„ค ์‚ฌ์ดํŠธ๊ฐ€ ํ›จ์”ฌ ํ”„๋กœํŽ˜์…”๋„ํ•ด ๋ณด์ผ ๊ฑฐ์•ผ. ๐Ÿš€

๐Ÿ• ์‹œ๊ฐ„ ๊ธฐ๋ฐ˜ ์ž๋™ ์ „ํ™˜

์‚ฌ์šฉ์ž์˜ ํ˜„์žฌ ์‹œ๊ฐ„์— ๋”ฐ๋ผ ์ž๋™์œผ๋กœ ๋‹คํฌ ๋ชจ๋“œ๋ฅผ ์ผœ๊ณ  ๋„๋Š” ๊ธฐ๋Šฅ์ด์•ผ.
์˜ˆ๋ฅผ ๋“ค์–ด, ์˜คํ›„ 8์‹œ๋ถ€ํ„ฐ ์˜ค์ „ 6์‹œ๊นŒ์ง€๋Š” ์ž๋™์œผ๋กœ ๋‹คํฌ ๋ชจ๋“œ๋ฅผ ํ™œ์„ฑํ™”ํ•˜๋Š” ๊ฑฐ์ง€.

// ์‹œ๊ฐ„ ๊ธฐ๋ฐ˜ ์ž๋™ ๋‹คํฌ ๋ชจ๋“œ
function autoThemeByTime() {
  const hour = new Date().getHours();
  const isDarkTime = hour >= 20 || hour < 6; // ์ €๋… 8์‹œ ~ ์ƒˆ๋ฒฝ 6์‹œ
  
  // ์‚ฌ์šฉ์ž๊ฐ€ ์ˆ˜๋™์œผ๋กœ ์„ค์ •ํ•˜์ง€ ์•Š์•˜์„ ๋•Œ๋งŒ ์ž๋™ ์ „ํ™˜
  if (!localStorage.getItem('manualThemeSet')) {
    const theme = isDarkTime ? 'dark' : 'light';
    setTheme(theme);
  }
}

// ํŽ˜์ด์ง€ ๋กœ๋“œ ์‹œ ์‹คํ–‰
autoThemeByTime();

// 1์‹œ๊ฐ„๋งˆ๋‹ค ์ฒดํฌ
setInterval(autoThemeByTime, 3600000);

// ํ† ๊ธ€ ๋ฒ„ํŠผ ํด๋ฆญ ์‹œ ์ˆ˜๋™ ์„ค์ • ํ”Œ๋ž˜๊ทธ
document.getElementById('theme-toggle').addEventListener('click', () => {
  localStorage.setItem('manualThemeSet', 'true');
  // 24์‹œ๊ฐ„ ํ›„ ์ž๋™ ๋ชจ๋“œ๋กœ ๋ณต๊ท€
  setTimeout(() => {
    localStorage.removeItem('manualThemeSet');
  }, 86400000);
});

๐ŸŒ ์œ„์น˜ ๊ธฐ๋ฐ˜ ์ผ๋ชฐ/์ผ์ถœ ๊ฐ์ง€

๋” ์ •๊ตํ•˜๊ฒŒ ํ•˜๋ ค๋ฉด, ์‚ฌ์šฉ์ž์˜ ์œ„์น˜๋ฅผ ๊ธฐ๋ฐ˜์œผ๋กœ ์‹ค์ œ ์ผ๋ชฐ/์ผ์ถœ ์‹œ๊ฐ„์— ๋งž์ถฐ
๋‹คํฌ ๋ชจ๋“œ๋ฅผ ์ „ํ™˜ํ•  ์ˆ˜๋„ ์žˆ์–ด. SunCalc ๊ฐ™์€ ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ๋ฅผ ์‚ฌ์šฉํ•˜๋ฉด ์‰ฝ๊ฒŒ ๊ตฌํ˜„ ๊ฐ€๋Šฅํ•ด!

// Geolocation API๋กœ ์œ„์น˜ ๊ฐ€์ ธ์˜ค๊ธฐ
function getLocationAndSetTheme() {
  if ('geolocation' in navigator) {
    navigator.geolocation.getCurrentPosition(
      (position) => {
        const lat = position.coords.latitude;
        const lon = position.coords.longitude;
        
        // ์ผ๋ชฐ/์ผ์ถœ ์‹œ๊ฐ„ ๊ณ„์‚ฐ (๊ฐ„๋‹จํ•œ ๋ฒ„์ „)
        const times = calculateSunTimes(lat, lon);
        const now = new Date();
        
        const isDark = now < times.sunrise || now > times.sunset;
        setTheme(isDark ? 'dark' : 'light');
      },
      (error) => {
        // ์œ„์น˜ ์ •๋ณด๋ฅผ ๊ฐ€์ ธ์˜ฌ ์ˆ˜ ์—†์œผ๋ฉด ์‹œ๊ฐ„ ๊ธฐ๋ฐ˜์œผ๋กœ ํด๋ฐฑ
        autoThemeByTime();
      }
    );
  }
}

// ๊ฐ„๋‹จํ•œ ์ผ์ถœ/์ผ๋ชฐ ๊ณ„์‚ฐ ํ•จ์ˆ˜
function calculateSunTimes(lat, lon) {
  // ์‹ค์ œ๋กœ๋Š” SunCalc ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ ์‚ฌ์šฉ ๊ถŒ์žฅ
  // ์—ฌ๊ธฐ์„œ๋Š” ๊ฐœ๋…๋งŒ ๋ณด์—ฌ์ฃผ๋Š” ๊ฐ„๋‹จํ•œ ๋ฒ„์ „
  const date = new Date();
  const sunrise = new Date(date);
  sunrise.setHours(6, 0, 0); // ๊ฐ„๋‹จํžˆ 6์‹œ๋กœ ์„ค์ •
  
  const sunset = new Date(date);
  sunset.setHours(18, 0, 0); // ๊ฐ„๋‹จํžˆ 18์‹œ๋กœ ์„ค์ •
  
  return { sunrise, sunset };
}
๐Ÿ’ก ๊ฐœ์ธ์ •๋ณด ๋ณดํ˜ธ: ์œ„์น˜ ์ •๋ณด๋ฅผ ์‚ฌ์šฉํ•  ๋•Œ๋Š” ๋ฐ˜๋“œ์‹œ ์‚ฌ์šฉ์ž์˜ ๋™์˜๋ฅผ ๋ฐ›์•„์•ผ ํ•ด. ๊ทธ๋ฆฌ๊ณ  ์œ„์น˜ ์ •๋ณด๋ฅผ ์„œ๋ฒ„์— ์ €์žฅํ•˜์ง€ ๋ง๊ณ , ํด๋ผ์ด์–ธํŠธ ์ธก์—์„œ๋งŒ ์ฒ˜๋ฆฌํ•˜๋Š” ๊ฒŒ ์ข‹์•„!

๐ŸŽš๏ธ ๋ฐ๊ธฐ ์กฐ์ ˆ ์Šฌ๋ผ์ด๋”

๋‹จ์ˆœํžˆ ๋ผ์ดํŠธ/๋‹คํฌ ๋‘ ๊ฐ€์ง€๋งŒ์ด ์•„๋‹ˆ๋ผ, ์‚ฌ์šฉ์ž๊ฐ€ ์›ํ•˜๋Š” ๋ฐ๊ธฐ๋ฅผ ์ง์ ‘ ์กฐ์ ˆํ•  ์ˆ˜ ์žˆ๊ฒŒ ํ•ด๋ณด์ž.
์ด๊ฑด ์ •๋ง ๊ณ ๊ธ‰ ๊ธฐ๋Šฅ์ด์•ผ! ๐Ÿ˜Ž

<!-- HTML: ๋ฐ๊ธฐ ์กฐ์ ˆ ์Šฌ๋ผ์ด๋” -->
<div class="brightness-control">
  <label for="brightness-slider">๋ฐ๊ธฐ ์กฐ์ ˆ</label>
  <input type="range" 
         id="brightness-slider" 
         min="0" 
         max="100" 
         value="50">
  <span id="brightness-value">50%</span>
</div>

<script>
// ๋ฐ๊ธฐ ์กฐ์ ˆ ๊ธฐ๋Šฅ
const brightnessSlider = document.getElementById('brightness-slider');
const brightnessValue = document.getElementById('brightness-value');

brightnessSlider.addEventListener('input', (e) => {
  const brightness = e.target.value;
  brightnessValue.textContent = brightness + '%';
  
  // CSS ๋ณ€์ˆ˜๋กœ ๋ฐ๊ธฐ ์กฐ์ •
  const lightness = brightness / 100;
  document.documentElement.style.setProperty('--brightness-factor', lightness);
  
  // ๋กœ์ปฌ ์Šคํ† ๋ฆฌ์ง€์— ์ €์žฅ
  localStorage.setItem('brightness', brightness);
});

// ํŽ˜์ด์ง€ ๋กœ๋“œ ์‹œ ์ €์žฅ๋œ ๋ฐ๊ธฐ ์ ์šฉ
const savedBrightness = localStorage.getItem('brightness') || 50;
brightnessSlider.value = savedBrightness;
brightnessValue.textContent = savedBrightness + '%';
document.documentElement.style.setProperty('--brightness-factor', savedBrightness / 100);
</script>

<style>
/* CSS์—์„œ ๋ฐ๊ธฐ ํŒฉํ„ฐ ํ™œ์šฉ */
:root {
  --brightness-factor: 1;
}

[data-theme="dark"] {
  --bg-primary: hsl(0, 0%, calc(10% * var(--brightness-factor)));
  --bg-secondary: hsl(0, 0%, calc(18% * var(--brightness-factor)));
  --text-primary: hsl(0, 0%, calc(88% * var(--brightness-factor)));
}
</style>

๐ŸŽจ ์ปค์Šคํ…€ ํ…Œ๋งˆ ํ”„๋ฆฌ์…‹

๋ผ์ดํŠธ/๋‹คํฌ๋งŒ์ด ์•„๋‹ˆ๋ผ, ์—ฌ๋Ÿฌ ๊ฐ€์ง€ ์ƒ‰์ƒ ํ…Œ๋งˆ๋ฅผ ์ œ๊ณตํ•  ์ˆ˜๋„ ์žˆ์–ด.
์˜ˆ๋ฅผ ๋“ค์–ด, "๋‹คํฌ ๋ธ”๋ฃจ", "๋‹คํฌ ํผํ”Œ", "์„ธํ”ผ์•„" ๊ฐ™์€ ์˜ต์…˜๋“ค ๋ง์ด์•ผ.

// ํ…Œ๋งˆ ํ”„๋ฆฌ์…‹ ์ •์˜
const themePresets = {
  light: {
    '--bg-primary': '#ffffff',
    '--bg-secondary': '#f8f9fa',
    '--text-primary': '#212529',
    '--accent-color': '#0d6efd'
  },
  dark: {
    '--bg-primary': '#1a1a1a',
    '--bg-secondary': '#2d2d2d',
    '--text-primary': '#e0e0e0',
    '--accent-color': '#64b5f6'
  },
  'dark-blue': {
    '--bg-primary': '#0a1929',
    '--bg-secondary': '#132f4c',
    '--text-primary': '#b2bac2',
    '--accent-color': '#3399ff'
  },
  'dark-purple': {
    '--bg-primary': '#1a0a2e',
    '--bg-secondary': '#2d1b4e',
    '--text-primary': '#d4c5f9',
    '--accent-color': '#a78bfa'
  },
  sepia: {
    '--bg-primary': '#f4ecd8',
    '--bg-secondary': '#e8dcc4',
    '--text-primary': '#5c4a3a',
    '--accent-color': '#8b6f47'
  }
};

// ํ…Œ๋งˆ ์ ์šฉ ํ•จ์ˆ˜
function applyThemePreset(presetName) {
  const preset = themePresets[presetName];
  if (!preset) return;
  
  const root = document.documentElement;
  Object.keys(preset).forEach(property => {
    root.style.setProperty(property, preset[property]);
  });
  
  localStorage.setItem('themePreset', presetName);
}

// ํ…Œ๋งˆ ์„ ํƒ UI
function createThemeSelector() {
  const selector = document.createElement('div');
  selector.className = 'theme-selector';
  selector.innerHTML = `
    <button data-theme="light">โ˜€๏ธ Light</button>
    <button data-theme="dark">๐ŸŒ™ Dark</button>
    <button data-theme="dark-blue">๐ŸŒŠ Ocean</button>
    <button data-theme="dark-purple">๐Ÿ”ฎ Purple</button>
    <button data-theme="sepia">๐Ÿ“œ Sepia</button>
  `;
  
  selector.querySelectorAll('button').forEach(btn => {
    btn.addEventListener('click', () => {
      applyThemePreset(btn.dataset.theme);
    });
  });
  
  return selector;
}

๐Ÿ“ฑ ๋ชจ๋ฐ”์ผ ์ œ์Šค์ฒ˜ ์ง€์›

๋ชจ๋ฐ”์ผ์—์„œ๋Š” ์Šค์™€์ดํ”„ ์ œ์Šค์ฒ˜๋กœ ๋‹คํฌ ๋ชจ๋“œ๋ฅผ ์ „ํ™˜ํ•  ์ˆ˜ ์žˆ๊ฒŒ ํ•˜๋ฉด ํŽธ๋ฆฌํ•ด.
ํ™”๋ฉด ์ƒ๋‹จ์—์„œ ์•„๋ž˜๋กœ ์Šค์™€์ดํ”„ํ•˜๋ฉด ๋‹คํฌ ๋ชจ๋“œ๊ฐ€ ํ† ๊ธ€๋˜๋Š” ์‹์ด์ง€.

// ํ„ฐ์น˜ ์ด๋ฒคํŠธ๋กœ ์Šค์™€์ดํ”„ ๊ฐ์ง€
let touchStartY = 0;
let touchEndY = 0;

document.addEventListener('touchstart', (e) => {
  touchStartY = e.changedTouches[0].screenY;
}, { passive: true });

document.addEventListener('touchend', (e) => {
  touchEndY = e.changedTouches[0].screenY;
  handleSwipe();
}, { passive: true });

function handleSwipe() {
  const swipeDistance = touchEndY - touchStartY;
  const minSwipeDistance = 100; // ์ตœ์†Œ ์Šค์™€์ดํ”„ ๊ฑฐ๋ฆฌ
  
  // ํ™”๋ฉด ์ƒ๋‹จ 20% ์˜์—ญ์—์„œ๋งŒ ์ž‘๋™
  if (touchStartY < window.innerHeight * 0.2) {
    if (swipeDistance > minSwipeDistance) {
      // ์•„๋ž˜๋กœ ์Šค์™€์ดํ”„: ๋‹คํฌ ๋ชจ๋“œ ํ† ๊ธ€
      toggleTheme();
      
      // ํ–…ํ‹ฑ ํ”ผ๋“œ๋ฐฑ (์ง€์›ํ•˜๋Š” ๊ธฐ๊ธฐ์—์„œ)
      if ('vibrate' in navigator) {
        navigator.vibrate(50);
      }
    }
  }
}

๐Ÿ”” ๋‹คํฌ ๋ชจ๋“œ ์ „ํ™˜ ์•Œ๋ฆผ

๋‹คํฌ ๋ชจ๋“œ๊ฐ€ ์ „ํ™˜๋  ๋•Œ ์‚ฌ์šฉ์ž์—๊ฒŒ ๋ถ€๋“œ๋Ÿฌ์šด ์•Œ๋ฆผ์„ ๋ณด์—ฌ์ฃผ๋ฉด ์ข‹์•„.
ํ† ์ŠคํŠธ ๋ฉ”์‹œ์ง€๋‚˜ ๊ฐ„๋‹จํ•œ ์• ๋‹ˆ๋ฉ”์ด์…˜์œผ๋กœ ํ”ผ๋“œ๋ฐฑ์„ ์ œ๊ณตํ•˜๋Š” ๊ฑฐ์ง€.

// ํ† ์ŠคํŠธ ์•Œ๋ฆผ ํ•จ์ˆ˜
function showThemeToast(theme) {
  const toast = document.createElement('div');
  toast.className = 'theme-toast';
  toast.innerHTML = `
    <span class="toast-icon">${theme === 'dark' ? '๐ŸŒ™' : 'โ˜€๏ธ'}</span>
    <span class="toast-text">${theme === 'dark' ? '๋‹คํฌ' : '๋ผ์ดํŠธ'} ๋ชจ๋“œ ํ™œ์„ฑํ™”</span>
  `;
  
  document.body.appendChild(toast);
  
  // ์• ๋‹ˆ๋ฉ”์ด์…˜
  setTimeout(() => toast.classList.add('show'), 10);
  setTimeout(() => {
    toast.classList.remove('show');
    setTimeout(() => toast.remove(), 300);
  }, 2000);
}

// CSS
<style>
.theme-toast {
  position: fixed;
  bottom: -100px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-secondary);
  color: var(--text-primary);
  padding: 12px 24px;
  border-radius: 24px;
  box-shadow: 0 4px 12px var(--shadow);
  display: flex;
  align-items: center;
  gap: 10px;
  transition: bottom 0.3s ease;
  z-index: 9999;
}

.theme-toast.show {
  bottom: 30px;
}

.toast-icon {
  font-size: 20px;
}

.toast-text {
  font-size: 14px;
  font-weight: 500;
}
</style>

๐Ÿ’พ ํด๋ผ์šฐ๋“œ ๋™๊ธฐํ™”

์‚ฌ์šฉ์ž๊ฐ€ ์—ฌ๋Ÿฌ ๊ธฐ๊ธฐ๋ฅผ ์‚ฌ์šฉํ•œ๋‹ค๋ฉด, ๋‹คํฌ ๋ชจ๋“œ ์„ค์ •์„ ๋™๊ธฐํ™”ํ•ด์ฃผ๋ฉด ์ข‹๊ฒ ์ง€?
์›Œ๋“œํ”„๋ ˆ์Šค ์‚ฌ์šฉ์ž ๋ฉ”ํƒ€๋ฐ์ดํ„ฐ๋ฅผ ํ™œ์šฉํ•˜๋ฉด ๋กœ๊ทธ์ธํ•œ ์‚ฌ์šฉ์ž์˜ ์„ค์ •์„ ์ €์žฅํ•  ์ˆ˜ ์žˆ์–ด.

// PHP: ์‚ฌ์šฉ์ž ํ…Œ๋งˆ ์„ค์ • ์ €์žฅ
function save_user_theme_preference() {
  check_ajax_referer('theme_nonce', 'nonce');
  
  if (is_user_logged_in()) {
    $user_id = get_current_user_id();
    $theme = sanitize_text_field($_POST['theme']);
    update_user_meta($user_id, 'preferred_theme', $theme);
    wp_send_json_success();
  } else {
    wp_send_json_error('User not logged in');
  }
}
add_action('wp_ajax_save_theme', 'save_user_theme_preference');

// JavaScript: ํ…Œ๋งˆ ๋ณ€๊ฒฝ ์‹œ ์„œ๋ฒ„์— ์ €์žฅ
function setTheme(theme) {
  document.documentElement.setAttribute('data-theme', theme);
  localStorage.setItem('theme', theme);
  
  // ๋กœ๊ทธ์ธํ•œ ์‚ฌ์šฉ์ž๋ผ๋ฉด ์„œ๋ฒ„์—๋„ ์ €์žฅ
  if (typeof wpAjax !== 'undefined') {
    fetch(wpAjax.ajaxurl, {
      method: 'POST',
      headers: {
        'Content-Type': 'application/x-www-form-urlencoded',
      },
      body: new URLSearchParams({
        action: 'save_theme',
        theme: theme,
        nonce: wpAjax.nonce
      })
    });
  }
}

๐Ÿ› ๋ฌธ์ œ ํ•ด๊ฒฐ ๋ฐ ๋””๋ฒ„๊น…

๋‹คํฌ ๋ชจ๋“œ๋ฅผ ๊ตฌํ˜„ํ•˜๋‹ค ๋ณด๋ฉด ์˜ˆ์ƒ์น˜ ๋ชปํ•œ ๋ฌธ์ œ๋“ค์ด ์ƒ๊ธธ ์ˆ˜ ์žˆ์–ด.
์ž์ฃผ ๋ฐœ์ƒํ•˜๋Š” ๋ฌธ์ œ๋“ค๊ณผ ํ•ด๊ฒฐ ๋ฐฉ๋ฒ•์„ ์•Œ์•„๋ณด์ž! ๐Ÿ”

โŒ ์ž์ฃผ ๋ฐœ์ƒํ•˜๋Š” ๋ฌธ์ œ๋“ค

1. ํŠน์ • ์š”์†Œ๊ฐ€ ๋‹คํฌ ๋ชจ๋“œ์—์„œ ์•ˆ ๋ณด์ž„

์ฆ์ƒ:
๋‹คํฌ ๋ชจ๋“œ๋กœ ์ „ํ™˜ํ–ˆ๋Š”๋ฐ ์ผ๋ถ€ ํ…์ŠคํŠธ๋‚˜ ์•„์ด์ฝ˜์ด ๊ฒ€์€์ƒ‰ ๋ฐฐ๊ฒฝ์— ๊ฒ€์€์ƒ‰์œผ๋กœ ๋‚˜์™€์„œ ์•ˆ ๋ณด์—ฌ.

์›์ธ:
ํ•ด๋‹น ์š”์†Œ์— ํ•˜๋“œ์ฝ”๋”ฉ๋œ ์ƒ‰์ƒ ๊ฐ’์ด ์žˆ๊ฑฐ๋‚˜, CSS ์šฐ์„ ์ˆœ์œ„ ๋ฌธ์ œ.

ํ•ด๊ฒฐ ๋ฐฉ๋ฒ•:
/* ๋ฌธ์ œ๊ฐ€ ๋˜๋Š” ์š”์†Œ ์ฐพ๊ธฐ */
[data-theme="dark"] * {
  outline: 1px solid red; /* ์ž„์‹œ๋กœ ๋ชจ๋“  ์š”์†Œ์— ํ…Œ๋‘๋ฆฌ */
}

/* ํŠน์ • ์š”์†Œ ๊ฐ•์ œ ์Šคํƒ€์ผ ์ ์šฉ */
[data-theme="dark"] .problem-element {
  color: var(--text-primary) !important;
  background-color: var(--bg-primary) !important;
}

/* ๋˜๋Š” CSS ๋ณ€์ˆ˜ ์‚ฌ์šฉํ•˜๋„๋ก ์ˆ˜์ • */
.problem-element {
  color: var(--text-primary);
  background-color: var(--bg-primary);
}

2. ์ด๋ฏธ์ง€๊ฐ€ ๋„ˆ๋ฌด ๋ฐ์•„์„œ ๋ˆˆ์ด ๋ถ€์‹ฌ

์ฆ์ƒ:
๋‹คํฌ ๋ชจ๋“œ์—์„œ ๋ฐ์€ ์ด๋ฏธ์ง€๋“ค์ด ๋„ˆ๋ฌด ํŠ€์–ด ๋ณด์ด๊ณ  ๋ˆˆ์ด ๋ถ€์…”.

ํ•ด๊ฒฐ ๋ฐฉ๋ฒ•:
/* ๋ชจ๋“  ์ด๋ฏธ์ง€ ๋ฐ๊ธฐ ์กฐ์ • */
[data-theme="dark"] img:not(.no-filter) {
  filter: brightness(0.8) contrast(1.1);
}

/* ํŠน์ • ์ด๋ฏธ์ง€๋Š” ์ œ์™ธ */
[data-theme="dark"] .logo,
[data-theme="dark"] .product-image {
  filter: none;
}

/* ํ˜ธ๋ฒ„ ์‹œ ์›๋ž˜ ๋ฐ๊ธฐ */
[data-theme="dark"] img:hover {
  filter: brightness(1) contrast(1);
  transition: filter 0.3s ease;
}

3. ํ”Œ๋Ÿฌ๊ทธ์ธ/ํ…Œ๋งˆ ์ถฉ๋Œ

์ฆ์ƒ:
๋‹คํฌ ๋ชจ๋“œ ํ”Œ๋Ÿฌ๊ทธ์ธ์„ ์„ค์น˜ํ–ˆ๋Š”๋ฐ ๋‹ค๋ฅธ ํ”Œ๋Ÿฌ๊ทธ์ธ์ด๋‚˜ ํ…Œ๋งˆ์™€ ์ถฉ๋Œํ•ด์„œ ๋ ˆ์ด์•„์›ƒ์ด ๊นจ์ ธ.

ํ•ด๊ฒฐ ๋ฐฉ๋ฒ•:
1. ํ”Œ๋Ÿฌ๊ทธ์ธ์„ ํ•˜๋‚˜์”ฉ ๋น„ํ™œ์„ฑํ™”ํ•˜๋ฉด์„œ ์›์ธ ์ฐพ๊ธฐ
2. ๋ธŒ๋ผ์šฐ์ € ๊ฐœ๋ฐœ์ž ๋„๊ตฌ(F12)๋กœ CSS ์ถฉ๋Œ ํ™•์ธ
3. ๋‹คํฌ ๋ชจ๋“œ ํ”Œ๋Ÿฌ๊ทธ์ธ ์„ค์ •์—์„œ ํŠน์ • ์š”์†Œ ์ œ์™ธ
4. ์ปค์Šคํ…€ CSS๋กœ ๋ฌธ์ œ ์š”์†Œ ์ˆ˜์ •

/* WP Dark Mode ํ”Œ๋Ÿฌ๊ทธ์ธ์—์„œ ํŠน์ • ์š”์†Œ ์ œ์™ธ */
.wp-dark-mode-ignore {
  /* ์ด ํด๋ž˜์Šค๋ฅผ ๊ฐ€์ง„ ์š”์†Œ๋Š” ๋‹คํฌ ๋ชจ๋“œ ์ ์šฉ ์•ˆ ๋จ */
}

/* ๋˜๋Š” ํ”Œ๋Ÿฌ๊ทธ์ธ ์„ค์ •์—์„œ CSS ์„ ํƒ์ž๋กœ ์ œ์™ธ */
/* Settings > Advanced > Excludes์— ์ถ”๊ฐ€ */
.elementor-widget, .woocommerce-product

4. ํŽ˜์ด์ง€ ๋กœ๋“œ ์‹œ ๊นœ๋นก์ž„ (FOUC)

์ฆ์ƒ:
ํŽ˜์ด์ง€๋ฅผ ์ƒˆ๋กœ๊ณ ์นจํ•˜๋ฉด ์ž ๊น ๋ผ์ดํŠธ ๋ชจ๋“œ๊ฐ€ ๋ณด์˜€๋‹ค๊ฐ€ ๋‹คํฌ ๋ชจ๋“œ๋กœ ๋ฐ”๋€Œ๋ฉด์„œ ๊นœ๋นก์—ฌ.

ํ•ด๊ฒฐ ๋ฐฉ๋ฒ•:
<!-- head ํƒœ๊ทธ ์ตœ์ƒ๋‹จ์— ์ธ๋ผ์ธ ์Šคํฌ๋ฆฝํŠธ ์ถ”๊ฐ€ -->
<head>
  <script>
  (function() {
    const theme = localStorage.getItem('theme');
    if (theme) {
      document.documentElement.setAttribute('data-theme', theme);
    }
  })();
  </script>
  
  <!-- ๋‚˜๋จธ์ง€ head ๋‚ด์šฉ -->
</head>

<!-- ๋˜๋Š” CSS๋กœ ์ดˆ๊ธฐ ๋กœ๋”ฉ ์ˆจ๊ธฐ๊ธฐ -->
<style>
  html:not([data-theme]) {
    visibility: hidden;
  }
  html[data-theme] {
    visibility: visible;
  }
</style>

5. ๋ชจ๋ฐ”์ผ์—์„œ ์„ฑ๋Šฅ ์ €ํ•˜

์ฆ์ƒ:
๋‹คํฌ ๋ชจ๋“œ ์ „ํ™˜ ์‹œ ๋ชจ๋ฐ”์ผ์—์„œ ๋ฒ„๋ฒ…๊ฑฐ๋ฆฌ๊ฑฐ๋‚˜ ๋А๋ ค์ ธ.

ํ•ด๊ฒฐ ๋ฐฉ๋ฒ•:
/* GPU ๊ฐ€์† ํ™œ์šฉ */
[data-theme] {
  will-change: background-color, color;
  transform: translateZ(0);
}

/* ๋ถˆํ•„์š”ํ•œ transition ์ œ๊ฑฐ */
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}

/* ๋ชจ๋ฐ”์ผ์—์„œ transition ๊ฐ„์†Œํ™” */
@media (max-width: 768px) {
  * {
    transition-duration: 0.15s !important;
  }
}

๐Ÿ” ๋””๋ฒ„๊น… ๋„๊ตฌ ํ™œ์šฉ

๋ธŒ๋ผ์šฐ์ € ๊ฐœ๋ฐœ์ž ๋„๊ตฌ

์œ ์šฉํ•œ ๋””๋ฒ„๊น… ํŒ: 1. Elements ํƒญ: ์š”์†Œ๋ฅผ ์„ ํƒํ•˜๊ณ  Computed ํƒญ์—์„œ ์‹ค์ œ ์ ์šฉ๋œ ์Šคํƒ€์ผ ํ™•์ธ
2. Console ํƒญ: getComputedStyle(element)๋กœ CSS ๋ณ€์ˆ˜ ๊ฐ’ ํ™•์ธ
3. Network ํƒญ: CSS ํŒŒ์ผ ๋กœ๋”ฉ ์ˆœ์„œ์™€ ์‹œ๊ฐ„ ํ™•์ธ
4. Performance ํƒญ: ๋‹คํฌ ๋ชจ๋“œ ์ „ํ™˜ ์‹œ ์„ฑ๋Šฅ ์ธก์ •
5. Lighthouse: ์ ‘๊ทผ์„ฑ ์ ์ˆ˜ ํ™•์ธ
// Console์—์„œ ์œ ์šฉํ•œ ๋””๋ฒ„๊น… ๋ช…๋ น์–ด

// ํ˜„์žฌ ํ…Œ๋งˆ ํ™•์ธ
console.log(document.documentElement.getAttribute('data-theme'));

// CSS ๋ณ€์ˆ˜ ๊ฐ’ ํ™•์ธ
const root = document.documentElement;
const bgColor = getComputedStyle(root).getPropertyValue('--bg-primary');
console.log('Background color:', bgColor);

// ๋ชจ๋“  CSS ๋ณ€์ˆ˜ ์ถœ๋ ฅ
const allStyles = getComputedStyle(root);
const cssVars = Array.from(allStyles).filter(prop => prop.startsWith('--'));
cssVars.forEach(prop => {
  console.log(prop, ':', allStyles.getPropertyValue(prop));
});

// ๋‹คํฌ ๋ชจ๋“œ ์ง€์› ์—ฌ๋ถ€ ํ™•์ธ
console.log('Prefers dark:', window.matchMedia('(prefers-color-scheme: dark)').matches);

๐Ÿงช ํ…Œ์ŠคํŠธ ์ฒดํฌ๋ฆฌ์ŠคํŠธ

๋‹คํฌ ๋ชจ๋“œ ๊ตฌํ˜„ ํ›„ ๋ฐ˜๋“œ์‹œ ํ™•์ธํ•  ๊ฒƒ๋“ค:
  • โ˜‘๏ธ ๋ชจ๋“  ํŽ˜์ด์ง€์—์„œ ํ…์ŠคํŠธ๊ฐ€ ์ž˜ ๋ณด์ด๋Š”๊ฐ€?
  • โ˜‘๏ธ ๋ฒ„ํŠผ๊ณผ ๋งํฌ์˜ ํ˜ธ๋ฒ„ ์ƒํƒœ๊ฐ€ ๋ช…ํ™•ํ•œ๊ฐ€?
  • โ˜‘๏ธ ํผ ์ž…๋ ฅ ํ•„๋“œ๊ฐ€ ์ž˜ ๋ณด์ด๊ณ  ์‚ฌ์šฉ ๊ฐ€๋Šฅํ•œ๊ฐ€?
  • โ˜‘๏ธ ์ด๋ฏธ์ง€์™€ ์•„์ด์ฝ˜์ด ์ ์ ˆํ•œ ๋ฐ๊ธฐ์ธ๊ฐ€?
  • โ˜‘๏ธ ๊ทธ๋ฆผ์ž์™€ ํ…Œ๋‘๋ฆฌ๊ฐ€ ์ž˜ ๋ณด์ด๋Š”๊ฐ€?
  • โ˜‘๏ธ ๋ชจ๋ฐ”์ผ์—์„œ๋„ ์ž˜ ์ž‘๋™ํ•˜๋Š”๊ฐ€?
  • โ˜‘๏ธ ํŽ˜์ด์ง€ ๋กœ๋“œ ์‹œ ๊นœ๋นก์ž„์ด ์—†๋Š”๊ฐ€?
  • โ˜‘๏ธ ์‚ฌ์šฉ์ž ์„ ํƒ์ด ์ €์žฅ๋˜๊ณ  ์œ ์ง€๋˜๋Š”๊ฐ€?
  • โ˜‘๏ธ ์ ‘๊ทผ์„ฑ ๊ธฐ์ค€(WCAG)์„ ์ถฉ์กฑํ•˜๋Š”๊ฐ€?
  • โ˜‘๏ธ ์ฃผ์š” ๋ธŒ๋ผ์šฐ์ €์—์„œ ๋ชจ๋‘ ์ž‘๋™ํ•˜๋Š”๊ฐ€?
  • โ˜‘๏ธ ํ”Œ๋Ÿฌ๊ทธ์ธ/ํ…Œ๋งˆ์™€ ์ถฉ๋Œ์ด ์—†๋Š”๊ฐ€?
  • โ˜‘๏ธ ์„ฑ๋Šฅ ์ €ํ•˜๊ฐ€ ์—†๋Š”๊ฐ€?

โ™ฟ ์ ‘๊ทผ์„ฑ ๊ณ ๋ ค์‚ฌํ•ญ

๋‹คํฌ ๋ชจ๋“œ๋Š” ๋‹จ์ˆœํžˆ '๋ฉ‹์žˆ์–ด ๋ณด์ด๋Š”' ๊ธฐ๋Šฅ์ด ์•„๋‹ˆ๋ผ, ์ ‘๊ทผ์„ฑ์„ ๋†’์ด๋Š” ์ค‘์š”ํ•œ ๋„๊ตฌ์•ผ.
๋ชจ๋“  ์‚ฌ์šฉ์ž๊ฐ€ ํŽธํ•˜๊ฒŒ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ๋„๋ก ์ ‘๊ทผ์„ฑ์„ ๊ณ ๋ คํ•ด์•ผ ํ•ด. ๐ŸŒŸ

๐ŸŽฏ WCAG ๊ฐ€์ด๋“œ๋ผ์ธ ์ค€์ˆ˜

๋ช…์•”๋น„(Contrast Ratio) ๊ธฐ์ค€

WCAG 2.1 ๋ช…์•”๋น„ ๊ธฐ์ค€: โ€ข AA ๋“ฑ๊ธ‰ (์ตœ์†Œ):
- ์ผ๋ฐ˜ ํ…์ŠคํŠธ: 4.5:1
- ํฐ ํ…์ŠคํŠธ (18pt ์ด์ƒ): 3:1

โ€ข AAA ๋“ฑ๊ธ‰ (๊ถŒ์žฅ):
- ์ผ๋ฐ˜ ํ…์ŠคํŠธ: 7:1
- ํฐ ํ…์ŠคํŠธ: 4.5:1

๐Ÿ’ก ๋‹คํฌ ๋ชจ๋“œ์—์„œ๋Š” AAA ๋“ฑ๊ธ‰์„ ๋ชฉํ‘œ๋กœ ํ•˜๋Š” ๊ฒŒ ์ข‹์•„!

๋ช…์•”๋น„ ํ™•์ธ ๋„๊ตฌ

์ถ”์ฒœ ๋„๊ตฌ: 1. WebAIM Contrast Checker (webaim.org/resources/contrastchecker/)
- ๊ฐ€์žฅ ๊ฐ„๋‹จํ•˜๊ณ  ์ง๊ด€์ ์ธ ์˜จ๋ผ์ธ ๋„๊ตฌ

2. Colour Contrast Analyser (CCA)
- ๋ฐ์Šคํฌํ†ฑ ์•ฑ, ํ™”๋ฉด์˜ ์–ด๋–ค ์ƒ‰์ƒ์ด๋“  ์ธก์ • ๊ฐ€๋Šฅ

3. Chrome DevTools
- Elements ํƒญ์—์„œ ์ƒ‰์ƒ ์„ ํƒ ์‹œ ๋ช…์•”๋น„ ์ž๋™ ํ‘œ์‹œ

4. Stark ํ”Œ๋Ÿฌ๊ทธ์ธ (Figma, Sketch)
- ๋””์ž์ธ ๋‹จ๊ณ„์—์„œ ๋ช…์•”๋น„ ํ™•์ธ

๐Ÿ”ค ํ‚ค๋ณด๋“œ ๋„ค๋น„๊ฒŒ์ด์…˜

๋‹คํฌ ๋ชจ๋“œ ํ† ๊ธ€ ๋ฒ„ํŠผ์€ ํ‚ค๋ณด๋“œ๋กœ๋„ ์ ‘๊ทผ ๊ฐ€๋Šฅํ•ด์•ผ ํ•ด.
๋งˆ์šฐ์Šค๋ฅผ ์‚ฌ์šฉํ•  ์ˆ˜ ์—†๋Š” ์‚ฌ์šฉ์ž๋“ค์„ ์œ„ํ•ด์„œ ๋ง์ด์•ผ.

<!-- ์ ‘๊ทผ ๊ฐ€๋Šฅํ•œ ํ† ๊ธ€ ๋ฒ„ํŠผ -->
<button 
  id="theme-toggle"
  class="theme-toggle-btn"
  aria-label="๋‹คํฌ ๋ชจ๋“œ ์ „ํ™˜"
  aria-pressed="false"
  type="button"
  tabindex="0">
  <span aria-hidden="true">๐ŸŒ™</span>
  <span class="sr-only">๋‹คํฌ ๋ชจ๋“œ๋กœ ์ „ํ™˜</span>
</button>

<!-- ์Šคํฌ๋ฆฐ ๋ฆฌ๋” ์ „์šฉ ํ…์ŠคํŠธ -->
<style>
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}
</style>

<script>
// ํ‚ค๋ณด๋“œ ๋‹จ์ถ•ํ‚ค ์ง€์› (Ctrl + Shift + D)
document.addEventListener('keydown', (e) => {
  if (e.ctrlKey && e.shiftKey && e.key === 'D') {
    e.preventDefault();
    toggleTheme();
    
    // ์Šคํฌ๋ฆฐ ๋ฆฌ๋”์— ์•Œ๋ฆผ
    announceToScreenReader(
      `${currentTheme === 'dark' ? '๋‹คํฌ' : '๋ผ์ดํŠธ'} ๋ชจ๋“œ๋กœ ์ „ํ™˜๋˜์—ˆ์Šต๋‹ˆ๋‹ค`
    );
  }
});

// ์Šคํฌ๋ฆฐ ๋ฆฌ๋” ์•Œ๋ฆผ ํ•จ์ˆ˜
function announceToScreenReader(message) {
  const announcement = document.createElement('div');
  announcement.setAttribute('role', 'status');
  announcement.setAttribute('aria-live', 'polite');
  announcement.className = 'sr-only';
  announcement.textContent = message;
  
  document.body.appendChild(announcement);
  setTimeout(() => announcement.remove(), 1000);
}

// ๋ฒ„ํŠผ ์ƒํƒœ ์—…๋ฐ์ดํŠธ
function updateToggleButton(theme) {
  const button = document.getElementById('theme-toggle');
  button.setAttribute('aria-pressed', theme === 'dark');
  button.setAttribute('aria-label', 
    theme === 'dark' ? '๋ผ์ดํŠธ ๋ชจ๋“œ๋กœ ์ „ํ™˜' : '๋‹คํฌ ๋ชจ๋“œ๋กœ ์ „ํ™˜'
  );
}
</script>

๐ŸŽจ ํฌ์ปค์Šค ์ธ๋””์ผ€์ดํ„ฐ

ํ‚ค๋ณด๋“œ๋กœ ํƒ์ƒ‰ํ•  ๋•Œ ํ˜„์žฌ ํฌ์ปค์Šค๋œ ์š”์†Œ๊ฐ€ ๋ช…ํ™•ํžˆ ๋ณด์—ฌ์•ผ ํ•ด.
๋‹คํฌ ๋ชจ๋“œ์—์„œ๋„ ํฌ์ปค์Šค ํ‘œ์‹œ๊ฐ€ ์ž˜ ๋ณด์ด๋„๋ก ํ•ด์•ผ์ง€.

/* ์ ‘๊ทผ ๊ฐ€๋Šฅํ•œ ํฌ์ปค์Šค ์Šคํƒ€์ผ */
:focus {
  outline: 2px solid var(--focus-color);
  outline-offset: 2px;
}

/* ๋‹คํฌ ๋ชจ๋“œ ํฌ์ปค์Šค ์ƒ‰์ƒ */
:root {
  --focus-color: #0d6efd;
}

[data-theme="dark"] {
  --focus-color: #64b5f6;
}

/* ๋ฒ„ํŠผ ํฌ์ปค์Šค ์Šคํƒ€์ผ */
button:focus-visible {
  outline: 3px solid var(--focus-color);
  outline-offset: 3px;
  box-shadow: 0 0 0 4px rgba(100, 181, 246, 0.2);
}

/* ๋งํฌ ํฌ์ปค์Šค ์Šคํƒ€์ผ */
a:focus-visible {
  outline: 2px solid var(--focus-color);
  outline-offset: 2px;
  background-color: rgba(100, 181, 246, 0.1);
  border-radius: 2px;
}

/* ๋งˆ์šฐ์Šค ํด๋ฆญ ์‹œ์—๋Š” ํฌ์ปค์Šค ํ‘œ์‹œ ์•ˆ ํ•จ */
:focus:not(:focus-visible) {
  outline: none;
}

๐Ÿ”Š ์Šคํฌ๋ฆฐ ๋ฆฌ๋” ์ง€์›

์‹œ๊ฐ ์žฅ์• ์ธ ์‚ฌ์šฉ์ž๋ฅผ ์œ„ํ•ด ์Šคํฌ๋ฆฐ ๋ฆฌ๋”๊ฐ€ ๋‹คํฌ ๋ชจ๋“œ ์ƒํƒœ๋ฅผ ์ฝ์„ ์ˆ˜ ์žˆ์–ด์•ผ ํ•ด.

<!-- ARIA ๋ผ์ด๋ธŒ ๋ฆฌ์ „ -->
<div id="theme-status" 
     role="status" 
     aria-live="polite" 
     aria-atomic="true"
     class="sr-only">
</div>

<script>
function setTheme(theme) {
  document.documentElement.setAttribute('data-theme', theme);
  localStorage.setItem('theme', theme);
  
  // ์Šคํฌ๋ฆฐ ๋ฆฌ๋”์— ์•Œ๋ฆผ
  const status = document.getElementById('theme-status');
  status.textContent = `${theme === 'dark' ? '๋‹คํฌ' : '๋ผ์ดํŠธ'} ๋ชจ๋“œ๊ฐ€ ํ™œ์„ฑํ™”๋˜์—ˆ์Šต๋‹ˆ๋‹ค.`;
  
  // ๋ฒ„ํŠผ ์ƒํƒœ ์—…๋ฐ์ดํŠธ
  updateToggleButton(theme);
}
</script>

๐ŸŒ ๋‹ค๊ตญ์–ด ์ง€์›

๋‹ค์–‘ํ•œ ์–ธ์–ด์˜ ์‚ฌ์šฉ์ž๋ฅผ ์œ„ํ•ด ๋‹ค๊ตญ์–ด๋ฅผ ์ง€์›ํ•˜๋ฉด ์ข‹์•„.
์›Œ๋“œํ”„๋ ˆ์Šค์˜ ๋ฒˆ์—ญ ๊ธฐ๋Šฅ์„ ํ™œ์šฉํ•  ์ˆ˜ ์žˆ์–ด.

// PHP: ๋ฒˆ์—ญ ๊ฐ€๋Šฅํ•œ ํ…์ŠคํŠธ
function add_dark_mode_toggle() {
  $light_label = __('๋ผ์ดํŠธ ๋ชจ๋“œ๋กœ ์ „ํ™˜', 'your-theme');
  $dark_label = __('๋‹คํฌ ๋ชจ๋“œ๋กœ ์ „ํ™˜', 'your-theme');
  
  echo '<button id="theme-toggle" 
              class="theme-toggle-btn" 
              aria-label="' . esc_attr($dark_label) . '"
              data-light-label="' . esc_attr($light_label) . '"
              data-dark-label="' . esc_attr($dark_label) . '"
              type="button">
          ๐ŸŒ™
        </button>';
}

// JavaScript: ๋ผ๋ฒจ ์—…๋ฐ์ดํŠธ
function updateToggleButton(theme) {
  const button = document.getElementById('theme-toggle');
  const label = theme === 'dark' 
    ? button.dataset.lightLabel 
    : button.dataset.darkLabel;
  button.setAttribute('aria-label', label);
}

โšก ์• ๋‹ˆ๋ฉ”์ด์…˜ ๊ฐ์†Œ ๋ชจ๋“œ

์ผ๋ถ€ ์‚ฌ์šฉ์ž๋Š” ์• ๋‹ˆ๋ฉ”์ด์…˜์ด ๋ถˆํŽธํ•˜๊ฑฐ๋‚˜ ์–ด์ง€๋Ÿฌ์›€์„ ๋А๋‚„ ์ˆ˜ ์žˆ์–ด.
์‹œ์Šคํ…œ ์„ค์ •์˜ "์• ๋‹ˆ๋ฉ”์ด์…˜ ๊ฐ์†Œ" ์˜ต์…˜์„ ์กด์ค‘ํ•ด์•ผ ํ•ด.

/* ์• ๋‹ˆ๋ฉ”์ด์…˜ ๊ฐ์†Œ ๋ชจ๋“œ ์ง€์› */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* JavaScript๋กœ๋„ ํ™•์ธ ๊ฐ€๋Šฅ */
const prefersReducedMotion = window.matchMedia('(prefers-reduced-motion: reduce)').matches;

function setTheme(theme) {
  document.documentElement.setAttribute('data-theme', theme);
  
  if (!prefersReducedMotion) {
    // ์• ๋‹ˆ๋ฉ”์ด์…˜ ์‹คํ–‰
    playThemeTransitionAnimation();
  }
}

๐Ÿ“Š ์„ฑ๋Šฅ ์ตœ์ ํ™”

๋‹คํฌ ๋ชจ๋“œ๊ฐ€ ์•„๋ฌด๋ฆฌ ๋ฉ‹์ ธ๋„ ์‚ฌ์ดํŠธ ์†๋„๋ฅผ ๋А๋ฆฌ๊ฒŒ ๋งŒ๋“ค๋ฉด ์•ˆ ๋˜๊ฒ ์ง€?
์„ฑ๋Šฅ์„ ์ตœ์ ํ™”ํ•˜๋Š” ๋ฐฉ๋ฒ•๋“ค์„ ์•Œ์•„๋ณด์ž! โšก

๐Ÿš€ CSS ์ตœ์ ํ™”

1. CSS ๋ณ€์ˆ˜ vs ์ค‘๋ณต ์Šคํƒ€์ผ

โŒ ๋น„ํšจ์œจ์ ์ธ ๋ฐฉ๋ฒ•:
/* ๋ชจ๋“  ์š”์†Œ๋งˆ๋‹ค ๋‹คํฌ ๋ชจ๋“œ ์Šคํƒ€์ผ ์ค‘๋ณต */
.header { background: #fff; color: #000; }
[data-theme="dark"] .header { background: #1a1a1a; color: #e0e0e0; }

.card { background: #fff; color: #000; }
[data-theme="dark"] .card { background: #1a1a1a; color: #e0e0e0; }

.button { background: #fff; color: #000; }
[data-theme="dark"] .button { background: #1a1a1a; color: #e0e0e0; }
โœ… ํšจ์œจ์ ์ธ ๋ฐฉ๋ฒ•:
/* CSS ๋ณ€์ˆ˜๋กœ ํ•œ ๋ฒˆ๋งŒ ์ •์˜ */
:root {
  --bg: #fff;
  --text: #000;
}

[data-theme="dark"] {
  --bg: #1a1a1a;
  --text: #e0e0e0;
}

.header, .card, .button {
  background: var(--bg);
  color: var(--text);
}
๐Ÿ“ˆ CSS ํŒŒ์ผ ํฌ๊ธฐ๊ฐ€ ์•ฝ 40-60% ๊ฐ์†Œ!

2. Critical CSS ์ธ๋ผ์ธํ™”

๋‹คํฌ ๋ชจ๋“œ ๊ด€๋ จ ํ•ต์‹ฌ CSS๋Š” HTML์— ์ธ๋ผ์ธ์œผ๋กœ ๋„ฃ์–ด์„œ ๊นœ๋นก์ž„์„ ๋ฐฉ์ง€ํ•˜๊ณ  ์ดˆ๊ธฐ ๋กœ๋”ฉ์„ ๋น ๋ฅด๊ฒŒ ํ•ด.

<head>
  <style>
    /* Critical CSS: ๋‹คํฌ ๋ชจ๋“œ ๊ธฐ๋ณธ ๋ณ€์ˆ˜ */
    :root{--bg:#fff;--text:#000}
    [data-theme="dark"]{--bg:#1a1a1a;--text:#e0e0e0}
    body{background:var(--bg);color:var(--text);transition:background .3s,color .3s}
  </style>
  
  <!-- ๋‚˜๋จธ์ง€ CSS๋Š” ๋น„๋™๊ธฐ ๋กœ๋“œ -->
  <link rel="preload" href="style.css" as="style" onload="this.onload=null;this.rel='stylesheet'">
  <noscript><link rel="stylesheet" href="style.css"></noscript>
</head>

โš™๏ธ JavaScript ์ตœ์ ํ™”

1. ๋””๋ฐ”์šด์‹ฑ๊ณผ ์“ฐ๋กœํ‹€๋ง

ํ…Œ๋งˆ ์ „ํ™˜์ด๋‚˜ ์Šคํฌ๋กค ์ด๋ฒคํŠธ์—์„œ ๋ถˆํ•„์š”ํ•œ ํ•จ์ˆ˜ ํ˜ธ์ถœ์„ ์ค„์—ฌ์•ผ ํ•ด.

// ๋””๋ฐ”์šด์Šค ํ•จ์ˆ˜
function debounce(func, wait) {
  let timeout;
  return function executedFunction(...args) {
    const later = () => {
      clearTimeout(timeout);
      func(...args);
    };
    clearTimeout(timeout);
    timeout = setTimeout(later, wait);
  };
}

// ์“ฐ๋กœํ‹€ ํ•จ์ˆ˜
function throttle(func, limit) {
  let inThrottle;
  return function(...args) {
    if (!inThrottle) {
      func.apply(this, args);
      inThrottle = true;
      setTimeout(() => inThrottle = false, limit);
    }
  };
}

// ์‚ฌ์šฉ ์˜ˆ์‹œ
const handleResize = debounce(() => {
  adjustThemeForViewport();
}, 250);

window.addEventListener('resize', handleResize);

2. ์ด๋ฒคํŠธ ์œ„์ž„

์—ฌ๋Ÿฌ ์š”์†Œ์— ์ด๋ฒคํŠธ ๋ฆฌ์Šค๋„ˆ๋ฅผ ๋ถ™์ด๋Š” ๋Œ€์‹ , ๋ถ€๋ชจ ์š”์†Œ ํ•˜๋‚˜์—๋งŒ ๋ถ™์—ฌ์„œ ์„ฑ๋Šฅ์„ ๋†’์—ฌ.

// โŒ ๋น„ํšจ์œจ์ : ๊ฐ ๋ฒ„ํŠผ๋งˆ๋‹ค ๋ฆฌ์Šค๋„ˆ
document.querySelectorAll('.theme-option').forEach(btn => {
  btn.addEventListener('click', handleThemeChange);
});

// โœ… ํšจ์œจ์ : ๋ถ€๋ชจ์— ํ•˜๋‚˜๋งŒ
document.querySelector('.theme-selector').addEventListener('click', (e) => {
  if (e.target.matches('.theme-option')) {
    handleThemeChange(e);
  }
});

๐Ÿ’พ ๋กœ์ปฌ ์Šคํ† ๋ฆฌ์ง€ ์ตœ์ ํ™”

1. ์ €์žฅ ๋นˆ๋„ ์ œํ•œ

// ํ…Œ๋งˆ ๋ณ€๊ฒฝ ์‹œ๋งˆ๋‹ค ์ €์žฅํ•˜์ง€ ๋ง๊ณ , ๋””๋ฐ”์šด์Šค ์ ์šฉ
const saveTheme = debounce((theme) => {
  localStorage.setItem('theme', theme);
  localStorage.setItem('themeTimestamp', Date.now());
}, 500);

function setTheme(theme) {
  document.documentElement.setAttribute('data-theme', theme);
  saveTheme(theme);
}

2. ์Šคํ† ๋ฆฌ์ง€ ํฌ๊ธฐ ๊ด€๋ฆฌ

// ์˜ค๋ž˜๋œ ์„ค์ • ์ •๋ฆฌ
function cleanupOldSettings() {
  const timestamp = localStorage.getItem('themeTimestamp');
  const thirtyDaysAgo = Date.now() - (30 * 24 * 60 * 60 * 1000);
  
  if (timestamp && parseInt(timestamp) < thirtyDaysAgo) {
    // 30์ผ ์ด์ƒ ๋œ ์„ค์ •์€ ๊ธฐ๋ณธ๊ฐ’์œผ๋กœ ๋ฆฌ์…‹
    localStorage.removeItem('theme');
    localStorage.removeItem('themeTimestamp');
  }
}

// ํŽ˜์ด์ง€ ๋กœ๋“œ ์‹œ ์‹คํ–‰
cleanupOldSettings();

๐Ÿ–ผ๏ธ ์ด๋ฏธ์ง€ ์ตœ์ ํ™”

๋ฐ˜์‘ํ˜• ์ด๋ฏธ์ง€์™€ ๋‹คํฌ ๋ชจ๋“œ

<!-- picture ํƒœ๊ทธ๋กœ ๋‹คํฌ ๋ชจ๋“œ ์ „์šฉ ์ด๋ฏธ์ง€ ์ œ๊ณต -->
<picture>
  <source 
    srcset="hero-dark.webp" 
    media="(prefers-color-scheme: dark)"
    type="image/webp">
  <source 
    srcset="hero-light.webp" 
    media="(prefers-color-scheme: light)"
    type="image/webp">
  <img src="hero-light.jpg" alt="Hero image" loading="lazy">
</picture>

<!-- JavaScript๋กœ ๋™์  ์ „ํ™˜ -->
<script>
function updateImages(theme) {
  document.querySelectorAll('img[data-light-src][data-dark-src]').forEach(img => {
    const src = theme === 'dark' ? img.dataset.darkSrc : img.dataset.lightSrc;
    if (img.src !== src) {
      img.src = src;
    }
  });
}
</script>

๐Ÿ“ฆ ์ฝ”๋“œ ์Šคํ”Œ๋ฆฌํŒ…

๋‹คํฌ ๋ชจ๋“œ ๊ด€๋ จ ์ฝ”๋“œ๋ฅผ ๋ณ„๋„ ํŒŒ์ผ๋กœ ๋ถ„๋ฆฌํ•ด์„œ ํ•„์š”ํ•  ๋•Œ๋งŒ ๋กœ๋“œํ•˜์ž.

// ๋™์  import๋กœ ํ•„์š”ํ•  ๋•Œ๋งŒ ๋กœ๋“œ
async function loadAdvancedThemeFeatures() {
  if (userWantsAdvancedFeatures) {
    const { initAdvancedTheme } = await import('./advanced-theme.js');
    initAdvancedTheme();
  }
}

// ๋˜๋Š” Intersection Observer๋กœ ๋ทฐํฌํŠธ์— ๋“ค์–ด์˜ฌ ๋•Œ ๋กœ๋“œ
const observer = new IntersectionObserver((entries) => {
  entries.forEach(entry => {
    if (entry.isIntersecting) {
      loadAdvancedThemeFeatures();
      observer.disconnect();
    }
  });
});

observer.observe(document.querySelector('.theme-settings'));

๐Ÿ” ์„ฑ๋Šฅ ์ธก์ •

์„ฑ๋Šฅ ์ธก์ • ๋„๊ตฌ: 1. Lighthouse (Chrome DevTools)
- ์ „์ฒด์ ์ธ ์„ฑ๋Šฅ, ์ ‘๊ทผ์„ฑ, SEO ์ ์ˆ˜
- ๋‹คํฌ ๋ชจ๋“œ ์ „ํ›„ ๋น„๊ต

2. WebPageTest
- ์‹ค์ œ ์‚ฌ์šฉ์ž ํ™˜๊ฒฝ์—์„œ์˜ ๋กœ๋”ฉ ์†๋„
- ๋‹ค์–‘ํ•œ ๊ธฐ๊ธฐ์™€ ๋„คํŠธ์›Œํฌ ์กฐ๊ฑด ํ…Œ์ŠคํŠธ

3. Chrome Performance ํƒญ
- ํ…Œ๋งˆ ์ „ํ™˜ ์‹œ ํ”„๋ ˆ์ž„ ๋“œ๋กญ ํ™•์ธ
- JavaScript ์‹คํ–‰ ์‹œ๊ฐ„ ์ธก์ •

4. Bundle Analyzer
- JavaScript ๋ฒˆ๋“ค ํฌ๊ธฐ ๋ถ„์„
- ๋ถˆํ•„์š”ํ•œ ์ฝ”๋“œ ์ฐพ๊ธฐ
// Performance API๋กœ ์ธก์ •
function measureThemeSwitch() {
  performance.mark('theme-switch-start');
  
  setTheme(newTheme);
  
  performance.mark('theme-switch-end');
  performance.measure('theme-switch', 'theme-switch-start', 'theme-switch-end');
  
  const measure = performance.getEntriesByName('theme-switch')[0];
  console.log(`Theme switch took ${measure.duration}ms`);
  
  // 100ms ์ด์ƒ ๊ฑธ๋ฆฌ๋ฉด ๊ฒฝ๊ณ 
  if (measure.duration > 100) {
    console.warn('Theme switch is too slow!');
  }
}

๐ŸŽ“ ์‹ค์ „ ์˜ˆ์ œ: ์™„์ „ํ•œ ๋‹คํฌ ๋ชจ๋“œ ์‹œ์Šคํ…œ

์ง€๊ธˆ๊นŒ์ง€ ๋ฐฐ์šด ๋ชจ๋“  ๋‚ด์šฉ์„ ์ข…ํ•ฉํ•ด์„œ, ์‹ค์ œ๋กœ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ๋Š” ์™„์ „ํ•œ ๋‹คํฌ ๋ชจ๋“œ ์‹œ์Šคํ…œ์„ ๋งŒ๋“ค์–ด๋ณด์ž!
์ด ์˜ˆ์ œ๋Š” ๋ณต์‚ฌํ•ด์„œ ๋ฐ”๋กœ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ๋„๋ก ๋งŒ๋“ค์—ˆ์–ด. ๐ŸŽ‰

๐Ÿ“ ํŒŒ์ผ ๊ตฌ์กฐ

your-theme/
โ”œโ”€โ”€ dark-mode/
โ”‚   โ”œโ”€โ”€ dark-mode.css
โ”‚   โ”œโ”€โ”€ dark-mode.js
โ”‚   โ””โ”€โ”€ dark-mode.php
โ”œโ”€โ”€ functions.php
โ””โ”€โ”€ header.php

๐Ÿ“ 1. dark-mode.css

/* ============================================
   ๋‹คํฌ ๋ชจ๋“œ CSS - ์™„์ „ํ•œ ์‹œ์Šคํ…œ
   ============================================ */

/* CSS ๋ณ€์ˆ˜ ์ •์˜ */
:root {
  /* ๋ผ์ดํŠธ ๋ชจ๋“œ ์ƒ‰์ƒ */
  --bg-primary: #ffffff;
  --bg-secondary: #f8f9fa;
  --bg-tertiary: #e9ecef;
  
  --text-primary: #212529;
  --text-secondary: #6c757d;
  --text-tertiary: #adb5bd;
  
  --border-color: #dee2e6;
  --shadow-color: rgba(0, 0, 0, 0.1);
  
  --link-color: #0d6efd;
  --link-hover: #0a58ca;
  
  --success: #198754;
  --warning: #ffc107;
  --danger: #dc3545;
  --info: #0dcaf0;
  
  --focus-color: #0d6efd;
  
  /* ์ „ํ™˜ ์†๋„ */
  --transition-speed: 0.3s;
}

/* ๋‹คํฌ ๋ชจ๋“œ ์ƒ‰์ƒ */
[data-theme="dark"] {
  --bg-primary: #1a1a1a;
  --bg-secondary: #2d2d2d;
  --bg-tertiary: #3a3a3a;
  
  --text-primary: #e0e0e0;
  --text-secondary: #a0a0a0;
  --text-tertiary: #707070;
  
  --border-color: #404040;
  --shadow-color: rgba(0, 0, 0, 0.5);
  
  --link-color: #64b5f6;
  --link-hover: #90caf9;
  
  --success: #4caf50;
  --warning: #ffb74d;
  --danger: #ef5350;
  --info: #4fc3f7;
  
  --focus-color: #64b5f6;
}

/* ๊ธฐ๋ณธ ์š”์†Œ ์Šคํƒ€์ผ */
body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  transition: background-color var(--transition-speed) ease,
              color var(--transition-speed) ease;
}

/* ๋งํฌ */
a {
  color: var(--link-color);
  transition: color 0.2s ease;
}

a:hover {
  color: var(--link-hover);
}

/* ๋ฒ„ํŠผ */
button,
.button {
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  transition: all 0.2s ease;
}

button:hover,
.button:hover {
  background-color: var(--bg-tertiary);
}

/* ์ž…๋ ฅ ํ•„๋“œ */
input,
textarea,
select {
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  transition: all 0.2s ease;
}

input:focus,
textarea:focus,
select:focus {
  outline: 2px solid var(--focus-color);
  outline-offset: 2px;
  border-color: var(--focus-color);
}

/* ์นด๋“œ/ํŒจ๋„ */
.card,
.panel,
.widget {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  box-shadow: 0 2px 8px var(--shadow-color);
  transition: all var(--transition-speed) ease;
}

/* ํ…Œ์ด๋ธ” */
table {
  background-color: var(--bg-secondary);
  border-color: var(--border-color);
}

th {
  background-color: var(--bg-tertiary);
  color: var(--text-primary);
}

td {
  border-color: var(--border-color);
}

tr:hover {
  background-color: var(--bg-tertiary);
}

/* ์ฝ”๋“œ ๋ธ”๋ก */
code,
pre {
  background-color: var(--bg-tertiary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

/* ๋‹คํฌ ๋ชจ๋“œ์—์„œ ์ด๋ฏธ์ง€ ๋ฐ๊ธฐ ์กฐ์ • */
[data-theme="dark"] img:not(.no-filter) {
  filter: brightness(0.8) contrast(1.1);
  transition: filter 0.3s ease;
}

[data-theme="dark"] img:not(.no-filter):hover {
  filter: brightness(1) contrast(1);
}

/* ํ† ๊ธ€ ๋ฒ„ํŠผ ์Šคํƒ€์ผ */
.theme-toggle-btn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 2px solid var(--border-color);
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  font-size: 24px;
  cursor: pointer;
  box-shadow: 0 4px 12px var(--shadow-color);
  transition: all 0.3s ease;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.theme-toggle-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 16px var(--shadow-color);
}

.theme-toggle-btn:active {
  transform: scale(0.95);
}

.theme-toggle-btn:focus-visible {
  outline: 3px solid var(--focus-color);
  outline-offset: 3px;
}

/* ํ…Œ๋งˆ ์ „ํ™˜ ์• ๋‹ˆ๋ฉ”์ด์…˜ */
@keyframes themeTransition {
  0% { opacity: 1; }
  50% { opacity: 0.8; }
  100% { opacity: 1; }
}

.theme-transitioning {
  animation: themeTransition 0.3s ease;
}

/* ๋ชจ๋ฐ”์ผ ์ตœ์ ํ™” */
@media (max-width: 768px) {
  .theme-toggle-btn {
    bottom: 15px;
    right: 15px;
    width: 45px;
    height: 45px;
    font-size: 20px;
  }
}

/* ์• ๋‹ˆ๋ฉ”์ด์…˜ ๊ฐ์†Œ ๋ชจ๋“œ */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ์ ‘๊ทผ์„ฑ: ์Šคํฌ๋ฆฐ ๋ฆฌ๋” ์ „์šฉ */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* ํฌ์ปค์Šค ์ธ๋””์ผ€์ดํ„ฐ */
:focus-visible {
  outline: 2px solid var(--focus-color);
  outline-offset: 2px;
}

:focus:not(:focus-visible) {
  outline: none;
}

โš™๏ธ 2. dark-mode.js

/**
 * ๋‹คํฌ ๋ชจ๋“œ JavaScript - ์™„์ „ํ•œ ์‹œ์Šคํ…œ
 * @version 1.0.0
 */

(function() {
  'use strict';
  
  // ์„ค์ •
  const CONFIG = {
    storageKey: 'theme',
    dataAttribute: 'data-theme',
    transitionClass: 'theme-transitioning',
    transitionDuration: 300,
    autoSwitchEnabled: false,
    darkHourStart: 20,
    darkHourEnd: 6
  };
  
  // ์œ ํ‹ธ๋ฆฌํ‹ฐ ํ•จ์ˆ˜
  const utils = {
    // ์‹œ์Šคํ…œ ๋‹คํฌ ๋ชจ๋“œ ์„ ํ˜ธ๋„ ํ™•์ธ
    getSystemPreference: () => {
      return window.matchMedia('(prefers-color-scheme: dark)').matches 
        ? 'dark' 
        : 'light';
    },
    
    // ์ €์žฅ๋œ ํ…Œ๋งˆ ๊ฐ€์ ธ์˜ค๊ธฐ
    getSavedTheme: () => {
      return localStorage.getItem(CONFIG.storageKey);
    },
    
    // ํ…Œ๋งˆ ์ €์žฅ
    saveTheme: (theme) => {
      localStorage.setItem(CONFIG.storageKey, theme);
      localStorage.setItem(CONFIG.storageKey + 'Timestamp', Date.now());
    },
    
    // ํ˜„์žฌ ์‹œ๊ฐ„ ๊ธฐ๋ฐ˜ ํ…Œ๋งˆ ๊ฒฐ์ •
    getTimeBasedTheme: () => {
      const hour = new Date().getHours();
      return (hour >= CONFIG.darkHourStart || hour < CONFIG.darkHourEnd) 
        ? 'dark' 
        : 'light';
    },
    
    // ์• ๋‹ˆ๋ฉ”์ด์…˜ ๊ฐ์†Œ ๋ชจ๋“œ ํ™•์ธ
    prefersReducedMotion: () => {
      return window.matchMedia('(prefers-reduced-motion: reduce)').matches;
    }
  };
  
  // ํ…Œ๋งˆ ๊ด€๋ฆฌ์ž
  const themeManager = {
    currentTheme: null,
    
    // ์ดˆ๊ธฐ ํ…Œ๋งˆ ๊ฒฐ์ •
    getInitialTheme: () => {
      const saved = utils.getSavedTheme();
      if (saved) return saved;
      
      if (CONFIG.autoSwitchEnabled) {
        return utils.getTimeBasedTheme();
      }
      
      return utils.getSystemPreference();
    },
    
    // ํ…Œ๋งˆ ์ ์šฉ
    applyTheme: (theme, withTransition = true) => {
      const root = document.documentElement;
      const oldTheme = themeManager.currentTheme;
      
      // ์ „ํ™˜ ์• ๋‹ˆ๋ฉ”์ด์…˜
      if (withTransition && !utils.prefersReducedMotion() && oldTheme) {
        root.classList.add(CONFIG.transitionClass);
        setTimeout(() => {
          root.classList.remove(CONFIG.transitionClass);
        }, CONFIG.transitionDuration);
      }
      
      // ํ…Œ๋งˆ ์ ์šฉ
      root.setAttribute(CONFIG.dataAttribute, theme);
      themeManager.currentTheme = theme;
      utils.saveTheme(theme);
      
      // UI ์—…๋ฐ์ดํŠธ
      themeManager.updateUI(theme);
      
      // ์ปค์Šคํ…€ ์ด๋ฒคํŠธ ๋ฐœ์ƒ
      window.dispatchEvent(new CustomEvent('themechange', { 
        detail: { theme, oldTheme } 
      }));
    },
    
    // UI ์—…๋ฐ์ดํŠธ
    updateUI: (theme) => {
      const toggleBtn = document.getElementById('theme-toggle');
      if (!toggleBtn) return;
      
      // ์•„์ด์ฝ˜ ๋ณ€๊ฒฝ
      toggleBtn.innerHTML = theme === 'dark' ? 'โ˜€๏ธ' : '๐ŸŒ™';
      
      // ARIA ์†์„ฑ ์—…๋ฐ์ดํŠธ
      toggleBtn.setAttribute('aria-pressed', theme === 'dark');
      toggleBtn.setAttribute('aria-label', 
        theme === 'dark' 
          ? '๋ผ์ดํŠธ ๋ชจ๋“œ๋กœ ์ „ํ™˜' 
          : '๋‹คํฌ ๋ชจ๋“œ๋กœ ์ „ํ™˜'
      );
      
      // ์Šคํฌ๋ฆฐ ๋ฆฌ๋” ์•Œ๋ฆผ
      themeManager.announceToScreenReader(
        `${theme === 'dark' ? '๋‹คํฌ' : '๋ผ์ดํŠธ'} ๋ชจ๋“œ๊ฐ€ ํ™œ์„ฑํ™”๋˜์—ˆ์Šต๋‹ˆ๋‹ค.`
      );
    },
    
    // ํ…Œ๋งˆ ํ† ๊ธ€
    toggleTheme: () => {
      const newTheme = themeManager.currentTheme === 'dark' ? 'light' : 'dark';
      themeManager.applyTheme(newTheme);
    },
    
    // ์Šคํฌ๋ฆฐ ๋ฆฌ๋” ์•Œ๋ฆผ
    announceToScreenReader: (message) => {
      const announcement = document.createElement('div');
      announcement.setAttribute('role', 'status');
      announcement.setAttribute('aria-live', 'polite');
      announcement.className = 'sr-only';
      announcement.textContent = message;
      
      document.body.appendChild(announcement);
      setTimeout(() => announcement.remove(), 1000);
    }
  };
  
  // ์ด๋ฒคํŠธ ํ•ธ๋“ค๋Ÿฌ
  const eventHandlers = {
    // ํ† ๊ธ€ ๋ฒ„ํŠผ ํด๋ฆญ
    handleToggleClick: (e) => {
      e.preventDefault();
      themeManager.toggleTheme();
    },
    
    // ํ‚ค๋ณด๋“œ ๋‹จ์ถ•ํ‚ค (Ctrl + Shift + D)
    handleKeyboard: (e) => {
      if (e.ctrlKey && e.shiftKey && e.key === 'D') {
        e.preventDefault();
        themeManager.toggleTheme();
      }
    },
    
    // ์‹œ์Šคํ…œ ํ…Œ๋งˆ ๋ณ€๊ฒฝ ๊ฐ์ง€
    handleSystemThemeChange: (e) => {
      if (!utils.getSavedTheme()) {
        themeManager.applyTheme(e.matches ? 'dark' : 'light', false);
      }
    },
    
    // ์‹œ๊ฐ„ ๊ธฐ๋ฐ˜ ์ž๋™ ์ „ํ™˜
    handleAutoSwitch: () => {
      if (CONFIG.autoSwitchEnabled && !localStorage.getItem('manualThemeSet')) {
        const timeBasedTheme = utils.getTimeBasedTheme();
        if (timeBasedTheme !== themeManager.currentTheme) {
          themeManager.applyTheme(timeBasedTheme);
        }
      }
    }
  };
  
  // ์ดˆ๊ธฐํ™”
  const init = () => {
    // ์ดˆ๊ธฐ ํ…Œ๋งˆ ์ ์šฉ (๊นœ๋นก์ž„ ๋ฐฉ์ง€๋ฅผ ์œ„ํ•ด ๋™๊ธฐ์ ์œผ๋กœ)
    const initialTheme = themeManager.getInitialTheme();
    document.documentElement.setAttribute(CONFIG.dataAttribute, initialTheme);
    themeManager.currentTheme = initialTheme;
    
    // DOM ๋กœ๋“œ ํ›„ ์ด๋ฒคํŠธ ๋ฆฌ์Šค๋„ˆ ๋“ฑ๋ก
    if (document.readyState === 'loading') {
      document.addEventListener('DOMContentLoaded', setupEventListeners);
    } else {
      setupEventListeners();
    }
  };
  
  // ์ด๋ฒคํŠธ ๋ฆฌ์Šค๋„ˆ ์„ค์ •
  const setupEventListeners = () => {
    // ํ† ๊ธ€ ๋ฒ„ํŠผ
    const toggleBtn = document.getElementById('theme-toggle');
    if (toggleBtn) {
      toggleBtn.addEventListener('click', eventHandlers.handleToggleClick);
      themeManager.updateUI(themeManager.currentTheme);
    }
    
    // ํ‚ค๋ณด๋“œ ๋‹จ์ถ•ํ‚ค
    document.addEventListener('keydown', eventHandlers.handleKeyboard);
    
    // ์‹œ์Šคํ…œ ํ…Œ๋งˆ ๋ณ€๊ฒฝ ๊ฐ์ง€
    window.matchMedia('(prefers-color-scheme: dark)')
      .addEventListener('change', eventHandlers.handleSystemThemeChange);
    
    // ์‹œ๊ฐ„ ๊ธฐ๋ฐ˜ ์ž๋™ ์ „ํ™˜ (1์‹œ๊ฐ„๋งˆ๋‹ค ์ฒดํฌ)
    if (CONFIG.autoSwitchEnabled) {
      setInterval(eventHandlers.handleAutoSwitch, 3600000);
    }
  };
  
  // ์ „์—ญ API ๋…ธ์ถœ
  window.darkMode = {
    toggle: themeManager.toggleTheme,
    set: themeManager.applyTheme,
    get: () => themeManager.currentTheme,
    config: CONFIG
  };
  
  // ์ดˆ๊ธฐํ™” ์‹คํ–‰
  init();
  
})();

๐Ÿ”ง 3. dark-mode.php

<?php
/**
 * ๋‹คํฌ ๋ชจ๋“œ PHP ํ•จ์ˆ˜
 * functions.php์— includeํ•˜์—ฌ ์‚ฌ์šฉ
 */

// ๋‹คํฌ ๋ชจ๋“œ ์Šคํฌ๋ฆฝํŠธ ๋ฐ ์Šคํƒ€์ผ ๋“ฑ๋ก
function enqueue_dark_mode_assets() {
    // CSS ๋“ฑ๋ก
    wp_enqueue_style(
        'dark-mode-styles',
        get_stylesheet_directory_uri() . '/dark-mode/dark-mode.css',
        array(),
        '1.0.0'
    );
    
    // JavaScript ๋“ฑ๋ก
    wp_enqueue_script(
        'dark-mode-script',
        get_stylesheet_directory_uri() . '/dark-mode/dark-mode.js',
        array(),
        '1.0.0',
        true
    );
}
add_action('wp_enqueue_scripts', 'enqueue_dark_mode_assets');

// ํ† ๊ธ€ ๋ฒ„ํŠผ HTML ์ถœ๋ ฅ
function render_dark_mode_toggle() {
    ?>
    <button 
        id="theme-toggle"
        class="theme-toggle-btn"
        aria-label="<?php esc_attr_e('๋‹คํฌ ๋ชจ๋“œ ์ „ํ™˜', 'your-theme'); ?>"
        aria-pressed="false"
        type="button">
        <span aria-hidden="true">๐ŸŒ™</span>
        <span class="sr-only"><?php esc_html_e('๋‹คํฌ ๋ชจ๋“œ๋กœ ์ „ํ™˜', 'your-theme'); ?></span>
    </button>
    <?php
}
add_action('wp_footer', 'render_dark_mode_toggle');

// ์‚ฌ์šฉ์ž ํ…Œ๋งˆ ์„ค์ • ์ €์žฅ (๋กœ๊ทธ์ธํ•œ ์‚ฌ์šฉ์ž์šฉ)
function save_user_theme_preference() {
    check_ajax_referer('theme_nonce', 'nonce');
    
    if (!is_user_logged_in()) {
        wp_send_json_error('User not logged in');
        return;
    }
    
    $user_id = get_current_user_id();
    $theme = sanitize_text_field($_POST['theme']);
    
    if (!in_array($theme, array('light', 'dark'))) {
        wp_send_json_error('Invalid theme');
        return;
    }
    
    update_user_meta($user_id, 'preferred_theme', $theme);
    wp_send_json_success(array('theme' => $theme));
}
add_action('wp_ajax_save_theme', 'save_user_theme_preference');

// ์‚ฌ์šฉ์ž ํ…Œ๋งˆ ์„ค์ • ๋ถˆ๋Ÿฌ์˜ค๊ธฐ
function get_user_theme_preference() {
    if (!is_user_logged_in()) {
        return null;
    }
    
    $user_id = get_current_user_id();
    return get_user_meta($user_id, 'preferred_theme', true);
}

// head์— ์ธ๋ผ์ธ ์Šคํฌ๋ฆฝํŠธ ์ถ”๊ฐ€ (๊นœ๋นก์ž„ ๋ฐฉ์ง€)
function add_dark_mode_inline_script() {
    $user_theme = get_user_theme_preference();
    ?>
    <script>
    (function() {
        <?php if ($user_theme): ?>
        // ๋กœ๊ทธ์ธํ•œ ์‚ฌ์šฉ์ž์˜ ์ €์žฅ๋œ ์„ค์ • ์‚ฌ์šฉ
        const theme = '<?php echo esc_js($user_theme); ?>';
        <?php else: ?>
        // ๋กœ์ปฌ ์Šคํ† ๋ฆฌ์ง€ ๋˜๋Š” ์‹œ์Šคํ…œ ์„ค์ • ์‚ฌ์šฉ
        const theme = localStorage.getItem('theme') || 
            (window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light');
        <?php endif; ?>
        document.documentElement.setAttribute('data-theme', theme);
    })();
    </script>
    <?php
}
add_action('wp_head', 'add_dark_mode_inline_script', 1);

// AJAX nonce ์ถ”๊ฐ€
function add_theme_ajax_nonce() {
    if (is_user_logged_in()) {
        ?>
        <script>
        window.themeAjax = {
            ajaxurl: '<?php echo admin_url('admin-ajax.php'); ?>',
            nonce: '<?php echo wp_create_nonce('theme_nonce'); ?>'
        };
        </script>
        <?php
    }
}
add_action('wp_footer', 'add_theme_ajax_nonce', 5);

// ๊ด€๋ฆฌ์ž ํŽ˜์ด์ง€์—๋„ ๋‹คํฌ ๋ชจ๋“œ ์ ์šฉ (์„ ํƒ์‚ฌํ•ญ)
function enqueue_admin_dark_mode() {
    wp_enqueue_style(
        'admin-dark-mode',
        get_stylesheet_directory_uri() . '/dark-mode/dark-mode.css',
        array(),
        '1.0.0'
    );
    
    wp_enqueue_script(
        'admin-dark-mode-script',
        get_stylesheet_directory_uri() . '/dark-mode/dark-mode.js',
        array(),
        '1.0.0',
        true
    );
}
// add_action('admin_enqueue_scripts', 'enqueue_admin_dark_mode'); // ์ฃผ์„ ํ•ด์ œํ•˜์—ฌ ํ™œ์„ฑํ™”

?>

๐Ÿš€ 4. functions.php์— ์ถ”๊ฐ€

<?php
// ๋‹คํฌ ๋ชจ๋“œ ๊ธฐ๋Šฅ ํฌํ•จ
require_once get_stylesheet_directory() . '/dark-mode/dark-mode.php';

// ์ถ”๊ฐ€ ์ปค์Šคํ„ฐ๋งˆ์ด์ง• (์„ ํƒ์‚ฌํ•ญ)
function customize_dark_mode_config() {
    ?>
    <script>
    // ๋‹คํฌ ๋ชจ๋“œ ์„ค์ • ์ปค์Šคํ„ฐ๋งˆ์ด์ง•
    if (window.darkMode) {
        window.darkMode.config.autoSwitchEnabled = true; // ์ž๋™ ์ „ํ™˜ ํ™œ์„ฑํ™”
        window.darkMode.config.darkHourStart = 19; // ์ €๋… 7์‹œ๋ถ€ํ„ฐ
        window.darkMode.config.darkHourEnd = 7; // ์•„์นจ 7์‹œ๊นŒ์ง€
    }
    </script>
    <?php
}
add_action('wp_footer', 'customize_dark_mode_config', 20);
?>
๐ŸŽ‰ ์™„์„ฑ! ์ด์ œ ์™„์ „ํžˆ ์ž‘๋™ํ•˜๋Š” ๋‹คํฌ ๋ชจ๋“œ ์‹œ์Šคํ…œ์ด ๊ตฌ์ถ•๋˜์—ˆ์–ด!
์ด ์ฝ”๋“œ๋Š” ๋‹ค์Œ ๊ธฐ๋Šฅ๋“ค์„ ๋ชจ๋‘ ํฌํ•จํ•˜๊ณ  ์žˆ์–ด:

โœ… ๋ผ์ดํŠธ/๋‹คํฌ ๋ชจ๋“œ ์ „ํ™˜
โœ… ์‚ฌ์šฉ์ž ์„ ํƒ ์ €์žฅ (๋กœ์ปฌ ์Šคํ† ๋ฆฌ์ง€ + ์‚ฌ์šฉ์ž ๋ฉ”ํƒ€)
โœ… ์‹œ์Šคํ…œ ์„ค์ • ์ž๋™ ๊ฐ์ง€
โœ… ์‹œ๊ฐ„ ๊ธฐ๋ฐ˜ ์ž๋™ ์ „ํ™˜ (์„ ํƒ์‚ฌํ•ญ)
โœ… ํ‚ค๋ณด๋“œ ๋‹จ์ถ•ํ‚ค ์ง€์›
โœ… ์ ‘๊ทผ์„ฑ ์™„๋ฒฝ ์ง€์›
โœ… ์„ฑ๋Šฅ ์ตœ์ ํ™”
โœ… ๊นœ๋นก์ž„ ๋ฐฉ์ง€
โœ… ๋ชจ๋ฐ”์ผ ์ตœ์ ํ™”

๐Ÿ’ก ์‹ค๋ฌด ํŒ๊ณผ ์ฃผ์˜์‚ฌํ•ญ

๋‹คํฌ ๋ชจ๋“œ๋ฅผ ์‹ค์ œ ํ”„๋กœ์ ํŠธ์— ์ ์šฉํ•  ๋•Œ ์•Œ์•„๋‘๋ฉด ์ข‹์€ ํŒ๋“ค์„ ๊ณต์œ ํ• ๊ฒŒ!
์‹ค๋ฌด์—์„œ ๊ฒช์„ ์ˆ˜ ์žˆ๋Š” ํ•จ์ •๋“ค์„ ๋ฏธ๋ฆฌ ํ”ผํ•ด๊ฐ€์ž. ๐Ÿ˜Š

โœจ ๋””์ž์ธ ํŒ

1. ๋ธŒ๋žœ๋“œ ์ƒ‰์ƒ ์œ ์ง€ํ•˜๊ธฐ

๋‹คํฌ ๋ชจ๋“œ์—์„œ๋„ ๋ธŒ๋žœ๋“œ ์•„์ด๋ดํ‹ฐํ‹ฐ๋Š” ์œ ์ง€ํ•ด์•ผ ํ•ด.
๋กœ๊ณ ๋‚˜ ๋ธŒ๋žœ๋“œ ์ƒ‰์ƒ์€ ๋‹คํฌ ๋ชจ๋“œ์—์„œ๋„ ์ธ์‹ ๊ฐ€๋Šฅํ•˜๋„๋ก ์กฐ์ •ํ•˜๋˜, ์™„์ „ํžˆ ๋ฐ”๊พธ์ง€๋Š” ๋ง์ž.

/* ๋ธŒ๋žœ๋“œ ์ƒ‰์ƒ์€ ์•ฝ๊ฐ„๋งŒ ์กฐ์ • */
:root {
  --brand-primary: #ff6b6b; /* ๋ฐ์€ ๋นจ๊ฐ• */
}

[data-theme="dark"] {
  --brand-primary: #ff8787; /* ์กฐ๊ธˆ ๋” ๋ฐ๊ฒŒ */
}
2. ๊ทธ๋ผ๋””์–ธํŠธ ์กฐ์‹ฌํ•˜๊ธฐ

๋ผ์ดํŠธ ๋ชจ๋“œ์—์„œ ์˜ˆ์œ ๊ทธ๋ผ๋””์–ธํŠธ๊ฐ€ ๋‹คํฌ ๋ชจ๋“œ์—์„œ๋Š” ์ด์ƒํ•ด ๋ณด์ผ ์ˆ˜ ์žˆ์–ด.
๋‹คํฌ ๋ชจ๋“œ ์ „์šฉ ๊ทธ๋ผ๋””์–ธํŠธ๋ฅผ ๋”ฐ๋กœ ๋งŒ๋“œ๋Š” ๊ฒŒ ์ข‹์•„.

/* ๋ผ์ดํŠธ ๋ชจ๋“œ ๊ทธ๋ผ๋””์–ธํŠธ */
.hero {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* ๋‹คํฌ ๋ชจ๋“œ ๊ทธ๋ผ๋””์–ธํŠธ */
[data-theme="dark"] .hero {
  background: linear-gradient(135deg, #4a5fc1 0%, #5a3a7a 100%);
}
3. ์•„์ด์ฝ˜ ์ฒ˜๋ฆฌ

SVG ์•„์ด์ฝ˜์€ currentColor๋ฅผ ์‚ฌ์šฉํ•˜๋ฉด ์ž๋™์œผ๋กœ ์ƒ‰์ƒ์ด ๋ฐ”๋€Œ์–ด์„œ ํŽธํ•ด.

<svg fill="currentColor" ...>
  <!-- ์ž๋™์œผ๋กœ ํ…์ŠคํŠธ ์ƒ‰์ƒ์„ ๋”ฐ๋ผ๊ฐ -->
</svg>

โš ๏ธ ์ฃผ์˜์‚ฌํ•ญ

1. ํ…Œ์ŠคํŠธ๋ฅผ ์ถฉ๋ถ„ํžˆ ํ•˜์ž โ€ข ๋ชจ๋“  ํŽ˜์ด์ง€์—์„œ ํ…Œ์ŠคํŠธ (ํ™ˆ, ํฌ์ŠคํŠธ, ์•„์นด์ด๋ธŒ, 404 ๋“ฑ)
โ€ข ๋‹ค์–‘ํ•œ ๋ธŒ๋ผ์šฐ์ €์—์„œ ํ…Œ์ŠคํŠธ (Chrome, Firefox, Safari, Edge)
โ€ข ๋ชจ๋ฐ”์ผ ๊ธฐ๊ธฐ์—์„œ ํ…Œ์ŠคํŠธ
โ€ข ๋‹ค์–‘ํ•œ ํ”Œ๋Ÿฌ๊ทธ์ธ ์กฐํ•ฉ์—์„œ ํ…Œ์ŠคํŠธ
โ€ข ์ ‘๊ทผ์„ฑ ๋„๊ตฌ๋กœ ํ…Œ์ŠคํŠธ (์Šคํฌ๋ฆฐ ๋ฆฌ๋”, ํ‚ค๋ณด๋“œ ๋„ค๋น„๊ฒŒ์ด์…˜)
2. ์„ฑ๋Šฅ ๋ชจ๋‹ˆํ„ฐ๋ง ๋‹คํฌ ๋ชจ๋“œ ์ถ”๊ฐ€ ํ›„ ์‚ฌ์ดํŠธ ์†๋„๊ฐ€ ๋А๋ ค์ง€์ง€ ์•Š์•˜๋Š”์ง€ ํ™•์ธํ•ด.
Lighthouse ์ ์ˆ˜๋ฅผ ๋น„๊ตํ•ด๋ณด๊ณ , ํ•„์š”ํ•˜๋ฉด ์ตœ์ ํ™”ํ•˜์ž.
3. ์‚ฌ์šฉ์ž ํ”ผ๋“œ๋ฐฑ ์ˆ˜์ง‘ ๋‹คํฌ ๋ชจ๋“œ๋ฅผ ์ถœ์‹œํ•œ ํ›„ ์‚ฌ์šฉ์ž๋“ค์˜ ํ”ผ๋“œ๋ฐฑ์„ ์ ๊ทน์ ์œผ๋กœ ์ˆ˜์ง‘ํ•ด.
์–ด๋–ค ๋ถ€๋ถ„์ด ๋ถˆํŽธํ•œ์ง€, ์–ด๋–ค ์ƒ‰์ƒ์ด ์ž˜ ์•ˆ ๋ณด์ด๋Š”์ง€ ๋“ฑ์„ ํŒŒ์•…ํ•˜๊ณ  ๊ฐœ์„ ํ•˜์ž.

๐Ÿ”„ ์œ ์ง€๋ณด์ˆ˜ ํŒ

1. CSS ๋ณ€์ˆ˜ ๋ฌธ์„œํ™”

์‚ฌ์šฉํ•˜๋Š” CSS ๋ณ€์ˆ˜๋“ค์„ ๋ฌธ์„œํ™”ํ•ด๋‘๋ฉด ๋‚˜์ค‘์— ์ˆ˜์ •ํ•  ๋•Œ ํŽธํ•ด.

/**
 * CSS ๋ณ€์ˆ˜ ๊ฐ€์ด๋“œ
 * 
 * ๋ฐฐ๊ฒฝ์ƒ‰:
 * --bg-primary: ๋ฉ”์ธ ๋ฐฐ๊ฒฝ
 * --bg-secondary: ์นด๋“œ, ํŒจ๋„ ๋ฐฐ๊ฒฝ
 * --bg-tertiary: ํ˜ธ๋ฒ„ ์ƒํƒœ ๋ฐฐ๊ฒฝ
 * 
 * ํ…์ŠคํŠธ ์ƒ‰์ƒ:
 * --text-primary: ์ฃผ์š” ํ…์ŠคํŠธ
 * --text-secondary: ๋ณด์กฐ ํ…์ŠคํŠธ
 * --text-tertiary: ๋น„ํ™œ์„ฑ ํ…์ŠคํŠธ
 * 
 * ... (๊ณ„์†)
 */
2. ๋ฒ„์ „ ๊ด€๋ฆฌ ๋‹คํฌ ๋ชจ๋“œ ๊ด€๋ จ ํŒŒ์ผ๋“ค์„ Git์œผ๋กœ ๊ด€๋ฆฌํ•˜๊ณ , ๋ณ€๊ฒฝ์‚ฌํ•ญ์„ ๋ช…ํ™•ํžˆ ๊ธฐ๋กํ•˜์ž.
ํŠนํžˆ ์ƒ‰์ƒ ๊ฐ’์„ ๋ณ€๊ฒฝํ•  ๋•Œ๋Š” ์ด์œ ๋ฅผ ์ปค๋ฐ‹ ๋ฉ”์‹œ์ง€์— ๋‚จ๊ธฐ๋Š” ๊ฒŒ ์ข‹์•„.
3. ์ •๊ธฐ์ ์ธ ์—…๋ฐ์ดํŠธ ์›Œ๋“œํ”„๋ ˆ์Šค, ํ…Œ๋งˆ, ํ”Œ๋Ÿฌ๊ทธ์ธ์ด ์—…๋ฐ์ดํŠธ๋˜๋ฉด ๋‹คํฌ ๋ชจ๋“œ๊ฐ€ ์ œ๋Œ€๋กœ ์ž‘๋™ํ•˜๋Š”์ง€ ํ™•์ธํ•ด.
ํŠนํžˆ ๋ฉ”์ด์ € ์—…๋ฐ์ดํŠธ ํ›„์—๋Š” ๊ผญ ํ…Œ์ŠคํŠธํ•˜์ž.

๐ŸŽฏ SEO ๊ณ ๋ ค์‚ฌํ•ญ

๋‹คํฌ ๋ชจ๋“œ๊ฐ€ SEO์— ์ง์ ‘์ ์ธ ์˜ํ–ฅ์„ ์ฃผ์ง€๋Š” ์•Š์ง€๋งŒ, ์‚ฌ์šฉ์ž ๊ฒฝํ—˜์ด ์ข‹์•„์ง€๋ฉด
์ฒด๋ฅ˜ ์‹œ๊ฐ„์ด ๋Š˜์–ด๋‚˜๊ณ  ์ดํƒˆ๋ฅ ์ด ๋‚ฎ์•„์ ธ์„œ ๊ฐ„์ ‘์ ์œผ๋กœ SEO์— ๋„์›€์ด ๋ผ.

SEO ์ฒดํฌ๋ฆฌ์ŠคํŠธ:
  • โ˜‘๏ธ ๋‹คํฌ ๋ชจ๋“œ์—์„œ๋„ ํ…์ŠคํŠธ๊ฐ€ ๊ฒ€์ƒ‰ ์—”์ง„์— ์ž˜ ๋ณด์ด๋Š”๊ฐ€?
  • โ˜‘๏ธ ์ด๋ฏธ์ง€ alt ํ…์ŠคํŠธ๊ฐ€ ์ œ๋Œ€๋กœ ์„ค์ •๋˜์–ด ์žˆ๋Š”๊ฐ€?
  • โ˜‘๏ธ ๊ตฌ์กฐํ™”๋œ ๋ฐ์ดํ„ฐ(Schema)๊ฐ€ ์—ฌ์ „ํžˆ ์œ ํšจํ•œ๊ฐ€?
  • โ˜‘๏ธ ํŽ˜์ด์ง€ ๋กœ๋”ฉ ์†๋„๊ฐ€ ๋А๋ ค์ง€์ง€ ์•Š์•˜๋Š”๊ฐ€?
  • โ˜‘๏ธ ๋ชจ๋ฐ”์ผ ์นœํ™”์„ฑ์ด ์œ ์ง€๋˜๋Š”๊ฐ€?

๐Ÿ’ผ ํด๋ผ์ด์–ธํŠธ ํ”„๋กœ์ ํŠธ์—์„œ

ํด๋ผ์ด์–ธํŠธ ํ”„๋กœ์ ํŠธ์—์„œ ๋‹คํฌ ๋ชจ๋“œ๋ฅผ ๊ตฌํ˜„ํ•  ๋•Œ๋Š” ๋‹ค์Œ ์‚ฌํ•ญ๋“ค์„ ๊ณ ๋ คํ•ด์•ผ ํ•ด.

1. ํด๋ผ์ด์–ธํŠธ ๊ต์œก โ€ข ๋‹คํฌ ๋ชจ๋“œ๊ฐ€ ๋ฌด์—‡์ธ์ง€, ์™œ ํ•„์š”ํ•œ์ง€ ์„ค๋ช…
โ€ข ์ถ”๊ฐ€ ๋น„์šฉ๊ณผ ๊ฐœ๋ฐœ ์‹œ๊ฐ„ ์•ˆ๋‚ด
โ€ข ์œ ์ง€๋ณด์ˆ˜ ๋ฐฉ๋ฒ• ๊ต์œก
โ€ข ์‚ฌ์šฉ์ž ํ”ผ๋“œ๋ฐฑ ์ˆ˜์ง‘ ๋ฐฉ๋ฒ• ์•ˆ๋‚ด
2. ๊ณ„์•ฝ์„œ์— ๋ช…์‹œ โ€ข ๋‹คํฌ ๋ชจ๋“œ ๊ตฌํ˜„ ๋ฒ”์œ„ ๋ช…ํ™•ํžˆ ํ•˜๊ธฐ
โ€ข ์ง€์› ๋ธŒ๋ผ์šฐ์ € ๋ชฉ๋ก
โ€ข ํ…Œ์ŠคํŠธ ๋ฒ”์œ„
โ€ข ์œ ์ง€๋ณด์ˆ˜ ์กฐ๊ฑด
3. ์ธ์ˆ˜์ธ๊ณ„ ์ž๋ฃŒ โ€ข ๋‹คํฌ ๋ชจ๋“œ ์‚ฌ์šฉ ๊ฐ€์ด๋“œ ๋ฌธ์„œ
โ€ข ์ƒ‰์ƒ ํŒ”๋ ˆํŠธ ๊ฐ€์ด๋“œ
โ€ข ๋ฌธ์ œ ํ•ด๊ฒฐ ๋งค๋‰ด์–ผ
โ€ข ์ปค์Šคํ„ฐ๋งˆ์ด์ง• ๋ฐฉ๋ฒ•
Best Practices Summary Design โœ“ Use soft grays โœ“ Maintain brand colors โœ“ Adjust gradients โœ“ Test contrast ratios โœ“ Optimize images โœ“ Use elevation system Performance โœ“ Use CSS variables โœ“ Minimize transitions โœ“ Prevent FOUC โœ“ Optimize JavaScript โœ“ Code splitting โœ“ Monitor metrics Accessibility โœ“ WCAG compliance โœ“ Keyboard navigation โœ“ Screen reader support โœ“ Focus indicators โœ“ Reduced motion โœ“ ARIA attributes

๐ŸŒŸ ๋งˆ๋ฌด๋ฆฌํ•˜๋ฉฐ

์—ฌ๊ธฐ๊นŒ์ง€ ์›Œ๋“œํ”„๋ ˆ์Šค ๋‹คํฌ ๋ชจ๋“œ ๊ตฌํ˜„์— ๋Œ€ํ•œ ๋ชจ๋“  ๊ฒƒ์„ ์•Œ์•„๋ดค์–ด! ๐ŸŽ‰
์ฒ˜์Œ์—๋Š” ๋ณต์žกํ•ด ๋ณด์ผ ์ˆ˜ ์žˆ์ง€๋งŒ, ๋‹จ๊ณ„๋ณ„๋กœ ๋”ฐ๋ผํ•˜๋‹ค ๋ณด๋ฉด ์ƒ๊ฐ๋ณด๋‹ค ์–ด๋ ต์ง€ ์•Š์•„.

๐Ÿ“š ํ•ต์‹ฌ ์š”์•ฝ

๋‹คํฌ ๋ชจ๋“œ ๊ตฌํ˜„ 3๊ฐ€์ง€ ๋ฐฉ๋ฒ•: 1. ํ”Œ๋Ÿฌ๊ทธ์ธ ์‚ฌ์šฉ - ๊ฐ€์žฅ ์‰ฝ๊ณ  ๋น ๋ฆ„ (์ดˆ๋ณด์ž ์ถ”์ฒœ)
2. ํ…Œ๋งˆ ๊ธฐ๋Šฅ ํ™œ์šฉ - ํ…Œ๋งˆ์— ๋‚ด์žฅ๋œ ๊ธฐ๋Šฅ ์‚ฌ์šฉ
3. ์ง์ ‘ ์ฝ”๋”ฉ - ์™„์ „ํ•œ ์ปค์Šคํ„ฐ๋งˆ์ด์ง• ๊ฐ€๋Šฅ (๊ฐœ๋ฐœ์ž ์ถ”์ฒœ)
๊ผญ ๊ธฐ์–ตํ•ด์•ผ ํ•  ๊ฒƒ๋“ค:
  • โœ… ์ˆœ์ˆ˜ํ•œ ๊ฒ€์€์ƒ‰(#000000) ๋Œ€์‹  ๋ถ€๋“œ๋Ÿฌ์šด ํšŒ์ƒ‰ ์‚ฌ์šฉ
  • โœ… ๋ช…์•”๋น„ ์ตœ์†Œ 4.5:1 ์ด์ƒ ์œ ์ง€ (WCAG ๊ธฐ์ค€)
  • โœ… CSS ๋ณ€์ˆ˜๋กœ ์ƒ‰์ƒ ์ฒด๊ณ„ ๊ด€๋ฆฌ
  • โœ… ๊นœ๋นก์ž„ ๋ฐฉ์ง€๋ฅผ ์œ„ํ•œ ์ธ๋ผ์ธ ์Šคํฌ๋ฆฝํŠธ
  • โœ… ์ ‘๊ทผ์„ฑ ๊ณ ๋ ค (ํ‚ค๋ณด๋“œ, ์Šคํฌ๋ฆฐ ๋ฆฌ๋”)
  • โœ… ์„ฑ๋Šฅ ์ตœ์ ํ™” (transition, ์ด๋ฏธ์ง€)
  • โœ… ์ถฉ๋ถ„ํ•œ ํ…Œ์ŠคํŠธ (๋‹ค์–‘ํ•œ ํ™˜๊ฒฝ)

๐Ÿš€ ๋‹ค์Œ ๋‹จ๊ณ„

๋‹คํฌ ๋ชจ๋“œ๋ฅผ ์„ฑ๊ณต์ ์œผ๋กœ ๊ตฌํ˜„ํ–ˆ๋‹ค๋ฉด, ์ด์ œ ๋‹ค์Œ ๋‹จ๊ณ„๋กœ ๋‚˜์•„๊ฐ€๋ณด์ž!

๋” ๋ฐœ์ „์‹œํ‚ค๊ธฐ: โ€ข ์—ฌ๋Ÿฌ ํ…Œ๋งˆ ํ”„๋ฆฌ์…‹ ์ถ”๊ฐ€ (๋‹คํฌ ๋ธ”๋ฃจ, ์„ธํ”ผ์•„ ๋“ฑ)
โ€ข ์‚ฌ์šฉ์ž ์ปค์Šคํ…€ ์ƒ‰์ƒ ์„ ํƒ ๊ธฐ๋Šฅ
โ€ข ํŽ˜์ด์ง€๋ณ„ ๋‹ค๋ฅธ ํ…Œ๋งˆ ์ ์šฉ
โ€ข ์‹œ๊ฐ„๋Œ€๋ณ„ ์ž๋™ ์ „ํ™˜ ๊ณ ๋„ํ™”
โ€ข ๋‹คํฌ ๋ชจ๋“œ ์‚ฌ์šฉ ํ†ต๊ณ„ ์ˆ˜์ง‘
โ€ข A/B ํ…Œ์ŠคํŠธ๋กœ ์ตœ์ ์˜ ์ƒ‰์ƒ ์ฐพ๊ธฐ

๐Ÿ’ฌ ์ปค๋ฎค๋‹ˆํ‹ฐ์™€ ํ•จ๊ป˜

๋‹คํฌ ๋ชจ๋“œ ๊ตฌํ˜„ ์ค‘์— ๋ง‰ํžˆ๋Š” ๋ถ€๋ถ„์ด ์žˆ๋‹ค๋ฉด, ์›Œ๋“œํ”„๋ ˆ์Šค ์ปค๋ฎค๋‹ˆํ‹ฐ์— ์งˆ๋ฌธํ•ด๋ด.
์žฌ๋Šฅ๋„ท(https://www.jaenung.net)์—์„œ๋„ ์›น๊ฐœ๋ฐœ ์ „๋ฌธ๊ฐ€๋“ค์„ ๋งŒ๋‚  ์ˆ˜ ์žˆ์–ด.
ํ˜ผ์ž ๊ณ ๋ฏผํ•˜์ง€ ๋ง๊ณ , ํ•จ๊ป˜ ํ•ด๊ฒฐํ•ด๋‚˜๊ฐ€์ž! ๐Ÿค

๐ŸŽ“ ํ•™์Šต ๋ฆฌ์†Œ์Šค: โ€ข MDN Web Docs - CSS ๋ณ€์ˆ˜, ๋ฏธ๋””์–ด ์ฟผ๋ฆฌ ๋ฌธ์„œ
โ€ข WCAG Guidelines - ์›น ์ ‘๊ทผ์„ฑ ๊ฐ€์ด๋“œ๋ผ์ธ
โ€ข Material Design - ๊ตฌ๊ธ€์˜ ๋‹คํฌ ํ…Œ๋งˆ ๊ฐ€์ด๋“œ
โ€ข WordPress Codex - ์›Œ๋“œํ”„๋ ˆ์Šค ๊ฐœ๋ฐœ ๋ฌธ์„œ
โ€ข ์žฌ๋Šฅ๋„ท ์ง€์‹์ธ์˜ ์ˆฒ - ๋‹ค์–‘ํ•œ ์›น๊ฐœ๋ฐœ ์ง€์‹ ๊ณต์œ 

โœจ ๋งˆ์ง€๋ง‰ ์กฐ์–ธ

๋‹คํฌ ๋ชจ๋“œ๋Š” ๋‹จ์ˆœํžˆ '์žˆ์œผ๋ฉด ์ข‹์€' ๊ธฐ๋Šฅ์ด ์•„๋‹ˆ๋ผ, ์‚ฌ์šฉ์ž ๊ฒฝํ—˜์„ ํฌ๊ฒŒ ํ–ฅ์ƒ์‹œํ‚ค๋Š” ํ•„์ˆ˜ ๊ธฐ๋Šฅ์ด ๋˜์–ด๊ฐ€๊ณ  ์žˆ์–ด.
ํŠนํžˆ ๋ชจ๋ฐ”์ผ ์‚ฌ์šฉ์ด ์ฆ๊ฐ€ํ•˜๊ณ , ์‚ฌ๋žŒ๋“ค์ด ๋ฐค๋Šฆ๊ฒŒ๊นŒ์ง€ ๋””์ง€ํ„ธ ๊ธฐ๊ธฐ๋ฅผ ์‚ฌ์šฉํ•˜๋Š” ์š”์ฆ˜,
๋‹คํฌ ๋ชจ๋“œ๋Š” ์‚ฌ์šฉ์ž์˜ ๋ˆˆ ๊ฑด๊ฐ•๊ณผ ํŽธ์˜์„ฑ์„ ์œ„ํ•œ ๋ฐฐ๋ ค์˜ ํ‘œํ˜„์ด์•ผ. ๐Ÿ‘€

์ฒ˜์Œ์—๋Š” ์ƒ‰์ƒ ์กฐํ•ฉ์ด ์–ด๋ ต๊ณ , ๋ชจ๋“  ์š”์†Œ๋ฅผ ๋‹คํฌ ๋ชจ๋“œ์— ๋งž๊ฒŒ ์กฐ์ •ํ•˜๋Š” ๊ฒŒ ๋ฒˆ๊ฑฐ๋กœ์šธ ์ˆ˜ ์žˆ์–ด.
ํ•˜์ง€๋งŒ ํ•œ ๋ฒˆ ์ œ๋Œ€๋กœ ๊ตฌ์ถ•ํ•ด๋‘๋ฉด, ์‚ฌ์šฉ์ž๋“ค์˜ ๋งŒ์กฑ๋„๊ฐ€ ๋ˆˆ์— ๋„๊ฒŒ ๋†’์•„์ง€๋Š” ๊ฑธ ๋А๋‚„ ์ˆ˜ ์žˆ์„ ๊ฑฐ์•ผ.
ํŠนํžˆ ๋ฐค์— ์‚ฌ์ดํŠธ๋ฅผ ๋ฐฉ๋ฌธํ•˜๋Š” ์‚ฌ์šฉ์ž๋“ค์ด "์™€, ๋‹คํฌ ๋ชจ๋“œ ์žˆ๋„ค!"๋ผ๊ณ  ๋ฐ˜์‘ํ•  ๋•Œ์˜ ๋ฟŒ๋“ฏํ•จ์€ ๋ง๋กœ ํ‘œํ˜„ํ•  ์ˆ˜ ์—†์ง€. ๐Ÿ˜Š

์ด ๊ฐ€์ด๋“œ๊ฐ€ ๋„ค ์›Œ๋“œํ”„๋ ˆ์Šค ์‚ฌ์ดํŠธ์— ๋ฉ‹์ง„ ๋‹คํฌ ๋ชจ๋“œ๋ฅผ ๊ตฌํ˜„ํ•˜๋Š” ๋ฐ ๋„์›€์ด ๋˜์—ˆ์œผ๋ฉด ์ข‹๊ฒ ์–ด.
๊ถ๊ธˆํ•œ ์ ์ด ์žˆ๊ฑฐ๋‚˜, ๋” ๊นŠ์ด ์žˆ๋Š” ๋‚ด์šฉ์ด ํ•„์š”ํ•˜๋‹ค๋ฉด ์–ธ์ œ๋“  ์žฌ๋Šฅ๋„ท์—์„œ ์ „๋ฌธ๊ฐ€๋“ค๊ณผ ์†Œํ†ตํ•ด๋ด!
ํ•จ๊ป˜ ๋” ๋‚˜์€ ์›น์„ ๋งŒ๋“ค์–ด๊ฐ€์ž! ๐Ÿš€

๐ŸŒ™ Happy Dark Mode Coding! โ˜€๏ธ

์‚ฌ์šฉ์ž์˜ ๋ˆˆ์„ ํŽธ์•ˆํ•˜๊ฒŒ, ๊ฒฝํ—˜์„ ํ’์š”๋กญ๊ฒŒ!
๋‹น์‹ ์˜ ์‚ฌ์ดํŠธ๊ฐ€ ๋ฐค๋‚ฎ์œผ๋กœ ๋น›๋‚˜๊ธธ ๋ฐ”๋ผ! โœจ

๋Œ“๊ธ€ ์ž‘์„ฑ

์ด ๊ธ€์— ๋Œ€ํ•œ ์—ฌ๋Ÿฌ๋ถ„์˜ ์ƒ๊ฐ์„ ๋“ค๋ ค์ฃผ์„ธ์š”

๋Œ“๊ธ€ 0
๋Œ“๊ธ€์„ ๋ถˆ๋Ÿฌ์˜ค๋Š” ์ค‘์ž…๋‹ˆ๋‹ค.

์•„์ง ๋Œ“๊ธ€์ด ์—†์Šต๋‹ˆ๋‹ค.