This is now the updated code. It works so far. 

"""
Applet: Todoist
Summary: Integration with Todoist
Description: Shows the tasks due today sorted by priority.
Author: zephyern
"""

load("cache.star", "cache")
load("encoding/base64.star", "base64")
load("encoding/json.star", "json")
load("http.star", "http")
load("humanize.star", "humanize")
load("render.star", "render")
load("schema.star", "schema")
load("secret.star", "secret")

DEFAULT\_NAME = "Todoist"
DEFAULT\_FILTER = "today | overdue"
DEFAULT\_SHOW\_IF\_EMPTY = True

NO\_TASKS\_CONTENT = "No Tasks :)"

TODOIST\_URL = "https://api.todoist.com/rest/v2/tasks"

OAUTH2\_CLIENT\_ID = secret.decrypt("AV6+xWcE3uxifd70n+JncXgagNue2eYtPYP05tbS77/hAd//mp4OQfMp+easxFROFLbCWsen/FCCDIzz8y5huFcAfV0hdyGL3mTGWaoUO2tVBvUUtGqPbOfb3HdJxMjuMb7C1fDFNqhdXhfJmo+UgRzRYzVZ/Q/C/sSl7U25DOrtKqhRs8I=")
OAUTH2\_CLIENT\_SECRET = secret.decrypt("AV6+xWcEYGPbL6d105xHQ68RZWY/KSrCK/ivqz2Y2AkrVuPO9iUFkYXBqoJs4phKRdeh2QxHjjGTuwQ7RakOEPrER+2VACdGHiiytCIpMZ5Qst1PeuMT5NECKqmHhW73MwReMBtvyPl0SbjdF8XijqzhK/YvcDTwVOdZZALaj+3dvGnqANk=")

def main(config):
 token = "a1f04ab5c8d3ebb03fb0011bbd6a0e7295025f57"
 if token:
 filter\_name = "%s" % (config.get("name") or DEFAULT\_NAME)
 filter = config.get("filter") or DEFAULT\_FILTER

 cache\_key = "%s/%s" % (token, filter)
 content = cache.get(cache\_key)
 if not content:
 print("Querying for tasks.")
 rep = http.get(TODOIST\_URL, headers = {"Authorization": "Bearer %s" % token}, params = {"filter": filter})

 if rep.status\_code == 200:
 tasks = rep.json()
 # Sort tasks by priority (highest first)
 sorted\_tasks = sorted(tasks, key=lambda task: task['priority'], reverse=True)
 elif rep.status\_code == 204:
 sorted\_tasks = []
 else:
 sorted\_tasks = None

 if sorted\_tasks == None:
 content = "Error"
 elif not sorted\_tasks:
 content = NO\_TASKS\_CONTENT
 else:
 task\_descriptions = [task['content'] for task in sorted\_tasks[:3]] # Show only the top three tasks
 task\_strings = []
 for desc in task\_descriptions:
 if type(desc) == list:
 desc = " ".join(desc)
 task\_strings.append(desc)
 content = task\_strings # Convert to a list of task descriptions

 children = []
 for task\_desc in content:
 children.append(render.Marquee(
 child=render.Text(content=task\_desc),
 width=46,
 ))
 return render.Root(
 delay = 100,
 max\_age = 86400,
 child =
 render.Box(
 render.Row(
 expanded = True,
 main\_align = "space\_evenly",
 cross\_align="center",
 children = [
 render.Column(
 expanded=True,
 cross\_align="center",
 main\_align = "space\_evenly",
 children = [
 render.Circle(
 diameter=6,
 color="#ed786c",
 child=render.Circle(color="#332726", diameter=2),
 ),
 render.Circle(
 diameter=6,
 color="#ed786c",
 child=render.Circle(color="#332726", diameter=2),
 ),
 render.Circle(
 diameter=6,
 color="#ed786c",
 child=render.Circle(color="#332726", diameter=2),
 ),
 ],
 ),
 render.Column(
 expanded=True,
 cross\_align="center",
 main\_align = "space\_evenly",
 children=[
 render.Marquee(
 child=render.Text(content=content[0] if len(content) > 0 else ''), width=46
 ),
 render.Marquee(
 child=render.Text(content=content[1] if len(content) > 1 else ''), width=46
 ),
 render.Marquee(
 child=render.Text(content=content[2] if len(content) > 2 else ''), width=46
 ),
 ],
 ),
 ],
 ),
 ),
 )
def oauth\_handler(params):
 params = json.decode(params)
 res = http.post(
 url = "https://todoist.com/oauth/access\_token",
 headers = {
 "Accept": "application/json",
 },
 form\_body = dict(
 code = params["code"],
 client\_id = OAUTH2\_CLIENT\_ID,
 client\_secret = OAUTH2\_CLIENT\_SECRET,
 ),
 form\_encoding = "application/x-www-form-urlencoded",
 )
 if res.status\_code != 200:
 fail("token request failed with status code: %d - %s" %
 (res.status\_code, res.body()))

 token\_params = res.json()
 access\_token = token\_params["access\_token"]

 return access\_token

def get\_schema():
 return schema.Schema(
 version = "1",
 fields = [
 schema.OAuth2(
 id = "auth",
 name = "Todoist",
 desc = "Connect your Todoist account.",
 icon = "squareCheck",
 handler = oauth\_handler,
 client\_id = OAUTH2\_CLIENT\_ID or "fake-client-id",
 authorization\_endpoint = "https://todoist.com/oauth/authorize",
 scopes = [
 "data:read",
 ],
 ),
 schema.Text(
 id = "name",
 name = "Name",
 desc = "Name to display",
 icon = "iCursor",
 default = "DEFAULT\_NAME",
 ),
 schema.Text(
 id = "filter",
 name = "Filter",
 desc = "Filter to apply to tasks.",
 icon = "filter",
 default = DEFAULT\_FILTER,
 ),
 schema.Toggle(
 id = "show",
 name = "Show When No Tasks",
 desc = "Show this app when there are no tasks.",
 icon = "eye",
 default = DEFAULT\_SHOW\_IF\_EMPTY,
 ),
 ],
 )
End of code. However can you give the circles a different color depending on what text line they go with? Highest priority is the current color, 2nd highest should be yellow, third highest should be blue and last should be grey.
이제 업데이트된 코드입니다. 지금까지는 작동합니다. """애플릿: Todoist요약: Todoist와 통합설명: 오늘 마감되는 작업을 우선순위에 따라 정렬하여 표시합니다.저자: zephyern"""load("cache.star", "cache")load("encoding/base64.star", "base64")load("encoding/json.star", "json")load("http.star", "http")load("humanize.star", "humanize")load("render.star", "render")load("schema.star", "schema")load("secret.star", "secret")DEFAULT\_NAME = "Todoist"DEFAULT\_FILTER = "오늘 | 기한 초과"DEFAULT\_SHOW\_IF\_EMPTY = TrueNO\_TASKS\_CONTENT = "작업 없음 :)"todoist\_URL = "https://api.todoist.com/rest/v2/tasks"OAUTH2\_CLIENT\_ID = 비밀. decrypt("AV6+xWcE3uxifd70n+JncXgagNue2eYtPYP05tbS77/hAd//mp4OQfMp+easxFROFLbCWsen/FCCDIzz8y5huFcAfV0hdyGL3mTGWaoUO2tVBvUUtGqPbOfb3HdJxMjuMb7C1fDFNqhdXhfJmo+UgRzRYzVZ/Q/C/sSl7U25DOrtKqhRs8I=")OAUTH2\_CLIENT\_SECRET = 비밀. decrypt("AV6+xWcEYGPbL6d105xHQ68RZWY/KSrCK/ivqz2Y2AkrVuPO9iUFkYXBqoJs4phKRdeh2QxHjjGTuwQ7RakOEPrER+2VACdGHiiytCIpMZ5Qst1PeuMT5NECKqmHhW73MwReMBtvyPl0SbjdF8XijqzhK/YvcDTwVOdZZALaj+3dvGnqANk=")def main(config): token = "a1f04ab5c8d3ebb03fb0011bbd6a0e7295025f57" if 토큰: filter\_name = "%s" % (config.get("name") 또는 DEFAULT\_NAME) filter = config.get("filter") 또는 DEFAULT\_FILTER cache\_key = "%s/%s" % (토큰, 필터) content = cache.get(cache\_key) 콘텐츠가 아니라면 print("작업 쿼리 중입니다.") rep = http.get(TODOIST\_URL, headers = {"Authorization": "Bearer %s" % token}, params = {"filter": filter}) rep.status\_code == 200: tasks = rep.json() # 우선순위에 따라 작업 정렬(가장 높은 것부터) sorted\_tasks = sorted(tasks, key=lambda task: task['priority'], reverse=True) elif rep.status\_code == 204: sorted\_tasks = [] else: sorted\_tasks = 없음 if sorted\_tasks == None: content = "오류" elif not sorted\_tasks: content = NO\_TASKS\_CONTENT else: task\_descriptions = [task['content'] for task in sorted\_tasks[:3]] # 상위 3개 작업만 표시 task\_strings = [] for desc in task\_descriptions: if type(desc) == list: desc = " ".join(desc) task\_strings.append(desc) content = task\_strings # 작업 설명 목록으로 변환합니다. children = [] 콘텐츠의 task\_desc에 대해 children.append(render.Marquee( child=render.Text(content=task\_desc), width=46, )) 반환 render.Root( delay = 100, max\_age = 86400, child = render.Box( render.Row( 확장 = True, main\_align = "공간\_균등", cross\_align="가운데", children = [ render.Column( expanded=True, cross\_align="가운데", main\_align = "공간\_균등", children = [ render.Circle( diameter=6, color="#ed786c", child=render.Circle(color="#332726", 지름=2), ), render.Circle( diameter=6, color="#ed786c", child=render.Circle(color="#332726", 지름=2), ), render.Circle( diameter=6, color="#ed786c", child=render.Circle(color="#332726", 지름=2), ), ], ), render.Column( expanded=True, cross\_align="가운데", main\_align = "공간\_균등", children=[ render.Marquee( child=render.Text(content=content[0] if len(content) > 0 else ''), width=46 ), render.Marquee( child=render.Text(content=content[1] if len(content) > 1 else ''), width=46 ), render.Marquee( child=render.Text(content=content[2] if len(content) > 2 else ''), width=46 ), ], ), ], ), ), )def oauth\_handler(params): params = json.decode(params) res = http.post( url = "https://todoist.com/oauth/access\_token", headers = { "Accept": "application/json", }, form\_body = 딕셔너리( code = params["code"], client\_id = OAUTH2\_CLIENT\_ID, client\_secret = OAUTH2\_CLIENT\_SECRET, ), form\_encoding = "application/x-www-form-urlencoded", ) if res.status\_code != 200: fail("상태 코드가 있는 토큰 요청에 실패했습니다: d - %s" %) (res.status\_code, res.body())) token\_params = res.json() access\_token = token\_params["access\_token"] 반환 access\_tokendef get\_schema(): return schema.Schema( version = "1", fields = [ schema.OAuth2( id = "auth", name = "Todoist", desc = "Todoist 계정을 연결하세요.", icon = "squareCheck", 핸들러 = OAU\_핸들러, client\_id = OAUTH2\_CLIENT\_ID 또는 "fake-client-id", authorization\_endpoint = "https://todoist.com/oauth/authorize", 범위 = [ "데이터:읽기", ], ), schema.Text( id = "이름", name = "이름", desc = "표시할 이름", icon = "아이커서", default = "DEFAULT\_NAME", ), schema.Text( id = "필터", name = "필터", desc = "작업에 적용할 필터.", icon = "필터", default = DEFAULT\_FILTER, ), 스키마.토글( id = "show", name = "작업이 없을 때 표시", desc = "작업이 없을 때 이 앱 표시.", icon = "눈", default = DEFAULT\_SHOW\_IF\_EMPTY, ), ], )코드 끝. 하지만 텍스트 줄에 따라 원에 다른 색상을 지정할 수 있을까요? 우선순위가 가장 높은 색은 현재 색상, 두 번째로 높은 색은 노란색, 세 번째로 높은 색은 파란색, 마지막 색은 회색이어야 합니다.