# 특정 테마에서만 색상 변수를 오버라이드하는 방법?

**URL:** <https://meta.discourse.org/t/how-to-overrule-a-color-variable-for-one-theme-only/139166>\
**Category:** Development\
**Created:** [1월 20, 2020, 9:25오전 UTC](https://meta.discourse.org/t/how-to-overrule-a-color-variable-for-one-theme-only/139166 "2020-01-20T09:25:21Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![smrtey](https://avatars.discourse-cdn.com/v4/letter/s/db5fbb/32.png) [@smrtey](https://meta.discourse.org/u/smrtey)\
**Post date:** [1월 21, 2020, 10:27오후 UTC](https://meta.discourse.org/t/how-to-overrule-a-color-variable-for-one-theme-only/139166/7 "2020-01-21T22:27:03Z")

</div>

아래는 매우 상세한 설명입니다. 설명대로 작동하지 않으면 알려주세요.

1. 아직 GitHub 계정이 없다면 하나를 생성하세요.

2. Discourse에서 테마를 내보냅니다:  
Admin(관리자) → Customize(커스터마이즈) → 내보낼 테마를 선택하세요.  

3. 컴퓨터에서 파일을 압축 해제하세요.

4. GitHub에 가서 새 저장소(New repository)를 생성하세요:  

5. "uploading an existing file"을 클릭하세요.  

6. 내보낸 테마에서 압축을 푼 폴더와 파일(아래와 같은 형태여야 합니다)을  

 ![image](https://global.discourse-cdn.com/meta/original/3X/7/8/7869529347c04483ccd18b7b6240f93e21fce4e5.png)

1. 이제 about.json 파일을 편집할 수 있습니다. 파일 이름을 클릭하세요.  
 ![image](https://global.discourse-cdn.com/meta/original/3X/6/c/6c06ea3e7438164ae7a9edd71efc5604da58d589.png)

파일은 다음과 같은 형태여야 합니다.

```plaintext

{
  "name": "Default",
  "component": false,
  "license_url": null,
  "about_url": null,
  "authors": null,
  "theme_version": null,
  "minimum_discourse_version": null,
  "maximum_discourse_version": null,
  "assets": {
    "badge": "assets/badge.png"
  },
  "color_schemes": {
    "blue-light": {
      "primary": "22262a",
      "secondary": "fefefe",
      "tertiary": "2572e4",
      "quaternary": "518ee9",
      "header_background": "1550a7",
      "header_primary": "fcfcfc",
      "highlight": "9edaf5",
      "danger": "ff7114",
      "success": "85cc54",
      "love": "de0100"    
    }
  },
  "learn_more": "https://meta.discourse.org/t/beginners-guide-to-using-discourse-themes/91966"
}

```

1. 편집 연필 아이콘을 클릭하세요.

![image](https://cdck-file-uploads-global.s3.dualstack.us-west-2.amazonaws.com/meta/original/3X/e/a/ea3b22a2968c27be9a604aa54afa0fa7a0878e9e.png) 이제 편집할 수 있습니다. 컬러 스킴의 이름을 변경하는 것을 권장합니다. 그렇지 않으면 테마를 사이트로 다시 가져올 때 같은 이름을 가진 서로 다른 두 개의 컬러 스킴이 생성됩니다. 따라서 아래에서는 `"blue-light": {`를 `"blue-lite": {`로 변경했습니다.

`love` 값 뒤에 쉼표를 포함시키고, 컬러 스킴의 끝부분 `love` 뒤에 색상 변수 오버라이드를 추가하기만 하면 됩니다.

```plaintext
  "name": "Default",
  "component": false,
  "license_url": null,
  "about_url": null,
  "authors": null,
  "theme_version": null,
  "minimum_discourse_version": null,
  "maximum_discourse_version": null,
  "assets": {
    "badge": "assets/badge.png"
  },
  "color_schemes": {
    "blue-lite": {
      "primary": "22262a",
      "secondary": "fefefe",
      "tertiary": "2572e4",
      "quaternary": "518ee9",
      "header_background": "1550a7",
      "header_primary": "fcfcfc",
      "highlight": "9edaf5",
      "danger": "ff7114",
      "success": "85cc54",
      "love": "de0100",
      "primary-high": "333333",
      "primary-medium": "666666",
      "primary-low-mid": "999999",
      "primary-low": "cccccc"    
    }
  },
  "learn_more": "https://meta.discourse.org/t/beginners-guide-to-using-discourse-themes/91966"
}

```

1. "Commit Changes"를 클릭하세요.

2. 저장소 이름으로 돌아가기 위해 저장소 이름을 클릭하세요.  

3. Clone or Download 링크를 복사하세요.  

4. Discourse에서 테마를 가져옵니다:  
Admin(관리자) → Customize(커스터마이즈) → Install(설치) → From a git repository: 링크를 붙여넣고 Install(설치)을 클릭하세요.  

5. 이제 이 테마를 로컬 테마와 마찬가지로 사용자 정의 $primary-high, $primary-medium, $primary-low-mid 및 $primary-low 값으로 편집할 수 있습니다.

---

_[View the full topic](https://meta.discourse.org/t/how-to-overrule-a-color-variable-for-one-theme-only/139166)._
