# 다크(또는 라이트) 모드에 특정 body 클래스를 추가하는 방법?

**URL:** <https://meta.discourse.org/t/how-to-add-a-specific-body-class-for-the-dark-or-light-mode/220062>\
**Category:** Product Support\
**Created:** [3월 4, 2022, 2:30오후 UTC](https://meta.discourse.org/t/how-to-add-a-specific-body-class-for-the-dark-or-light-mode/220062 "2022-03-04T14:30:29Z")\
**Posts on this page:** 1\
**Showing post:** 12

<div class="post-metadata">

**Author:** ![jordan.vidrine](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jordan.vidrine/32/515563_2.png) [@jordan.vidrine](https://meta.discourse.org/u/jordan.vidrine)\
**Post date:** [3월 7, 2022, 6:03오후 UTC](https://meta.discourse.org/t/how-to-add-a-specific-body-class-for-the-dark-or-light-mode/220062/12 "2022-03-07T18:03:46Z")

</div>

원하시는 경우, 일종의 숨겨진 우회 방법이 있습니다.

폴더를 생성하고 그 안에는 `about.json` 파일만 추가하면 됩니다.

저는 내장된 색상 함수에 의존하기보다 직접 변형을 지정하고 싶었기 때문에, `solarized light` 색상 스킴을 만들기 위해 실제로 이렇게 했습니다.

제가 만든 실제 `about.json` 파일은 다음과 같습니다.

그 다음 이 "테마"를 설치하면, 해당 색상 스킴이 포럼에 설치됩니다. 이 시점부터 다른 테마에서도 사용할 수 있도록 할 수 있습니다.

```json
{
  "name": "Solarized Light",
  "component": false,
  "license_url": null,
  "about_url": null,
  "authors": null,
  "theme_version": null,
  "minimum_discourse_version": null,
  "maximum_discourse_version": null,
  "assets": {
  },
  "color_schemes": {
    "Solarized Light": {
      "primary": "002B36",
      "primary-high": "4C6869",
      "primary-medium": "7E918C",
      "primary-low-mid": "A4AFA5",
      "primary-low": "D6D8C7",
      "primary-very-low": "F0ECD7",
      "secondary": "FCF6E1",
      "secondary-very-high": "E8E6D3",
      "secondary-high": "97A59D",
      "secondary-medium": "6C8280",
      "secondary-low": "325458",
      "tertiary": "0088cc",
      "tertiary-high": "329ED0",
      "tertiary-medium": "7EBFD7",
      "tertiary-low": "D6E6DE",
      "quaternary": "e45735",
      "header_background": "FCF6E1",
      "header_primary": "002B36",
      "highlight": "ffff4d",
      "highlight-high": "BCAA7F",
      "highlight-medium": "E3D0A3",
      "highlight-low": "FDF9AD",
      "danger": "e45735",
      "danger-low": "F8D9C2",
      "success": "009900",
      "success-medium": "4CB544",
      "success-low": "CFE5B9",
      "love": "fa6c8d",
      "love-low": "FCDDD2"
    }
  },
  "modifiers": {
  },
  "learn_more": "https://meta.discourse.org/t/beginners-guide-to-using-discourse-themes/91966"
}

```

---

_[View the full topic](https://meta.discourse.org/t/how-to-add-a-specific-body-class-for-the-dark-or-light-mode/220062)._
