# 투표 파이 차트 색상을 사용자 지정하는 방법은?

**URL:** https://meta.discourse.org/t/how-to-customize-poll-pie-chart-colors/149126
**Category:** Support
**Tags:** polls
**Created:** [4월 24, 2020, 9:37오전 UTC](https://meta.discourse.org/t/how-to-customize-poll-pie-chart-colors/149126 "2020-04-24T09:37:22Z")
**Posts on this page:** 1
**Showing post:** 7

<div class="post-metadata">

### Author: ![awesomerobot](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/awesomerobot/32/142900_2.png) [@awesomerobot](https://meta.discourse.org/u/awesomerobot)
#### Post date: [12월 5, 2025, 9:53오후 UTC](https://meta.discourse.org/t/how-to-customize-poll-pie-chart-colors/149126/7 "2025-12-05T21:53:35Z")

</div>

현재는 불가능하지만, 캔버스 요소에서 이전에 구현한 적이 있으므로 여기서도 가능하게 만들 수 있습니다!

이 PR이 방금 병합되었습니다.

> <https://github.com/discourse/discourse/pull/36495>
>
> This introduces the ability to customize the colors used within pie charts for p…olls. Admins and theme developers can now override the colors using CSS custom properties. I've also added specific properties to make targeting bar charts a little simpler too. 
> 
> If only some pie chart colors are overridden, we fall back to our default color gradients. 
> 
> Here's an example
> 
> \`\`\`css
> :root {
> --poll-pie-color-1: red;
> --poll-pie-color-2: yellow;
>         
> --poll-bar-background: lightblue;
> --poll-bar-color: blue;
> --poll-bar-color--chosen: salmon;
> }
> \`\`\`
> 
> \<img width="1446" height="794" alt="image" src="https://github.com/user-attachments/assets/d5a4731d-b7eb-4069-9a0d-c35c9e56518b" /\>
> 
> \<img width="1424" height="766" alt="image" src="https://github.com/user-attachments/assets/b30d337e-f714-499b-b48f-ecb9e6e728d7" /\>
> 
> 
> Included a test for the pie chart colors.

따라서 오늘 조금 후에 Discourse를 업데이트하면 막대 그래프와 원형 그래프 모두에 사용할 수 있는 새로운 변수에 접근할 수 있습니다:

```css
:root {
  --poll-pie-color-1: red;
  --poll-pie-color-2: yellow;
  /* --poll-pie-color-3: hotpink; etc */
        
  --poll-bar-background: lightblue;
  --poll-bar-color: blue;
  --poll-bar-color--chosen: salmon;
}

```

---

_[View the full topic](https://meta.discourse.org/t/how-to-customize-poll-pie-chart-colors/149126)._
