← 수업 제작 도구
홈 › Index › colorPalette (type)

colorPalette (type) (타입 colorPalette)

원본: Computation Layer 문서(colorPalette (type))

코드 안의 회색 줄은 원문 영어 주석이고, 파란 줄은 그 영어 주석의 번역이며, 연분홍 줄은 코드가 하는 일의 설명이다. 항목 설명은 번역이 아니라 해석이며 원문은 접어 둔 "원문(영어) 보기"에 있다.

Desmos 색들을 담고 있다.

원문(영어) 보기

Contains the Desmos colors.

속성(Attributes)

red type:colorPalette:red

Desmos 계산기에서 쓰는 빨간색.

원문(영어) 보기

The color red used in the Desmos calculator.

# Based on the choice selected, set the initial color
# to one of the 6 Desmos graph colors.
▷ 선택한 보기에 따라 처음 색을 Desmos 그래프의 6가지 색 중 하나로 정한다.

initialColor:
  when choice.isSelected(1) colors.red
  when choice.isSelected(2) colors.blue
  when choice.isSelected(3) colors.green
  when choice.isSelected(4) colors.purple
  when choice.isSelected(5) colors.orange
  otherwise colors.black
▶ 그림판의 처음 색(initialColor)은 choice의 1번 보기가 선택되었다면 colors.red, 2번이면 colors.blue, 3번이면 colors.green, 4번이면 colors.purple, 5번이면 colors.orange, 1~5번 보기 중 어느 것도 선택되지 않았다면 colors.black으로 한다.
initialColor는 처음 선택되어 있는 색을 정하고, isSelected(번호)는 객관식 구성요소에서 그 번호의 보기가 선택되었는지를 참 또는 거짓으로 알려 준다. colors는 Desmos 색들을 담고 있으며 colors.red, colors.blue처럼 Desmos 계산기에서 쓰는 색을 가리키고, when은 조건을 차례로 확인해 처음 맞는 값을 쓴다.

blue type:colorPalette:blue

Desmos 계산기에서 쓰는 파란색.

원문(영어) 보기

The color blue used in the Desmos calculator.

# Based on the choice selected, set the initial color
# to one of the 6 Desmos graph colors.
▷ 선택한 보기에 따라 처음 색을 Desmos 그래프의 6가지 색 중 하나로 정한다.

initialColor:
  when choice.isSelected(1) colors.red
  when choice.isSelected(2) colors.blue
  when choice.isSelected(3) colors.green
  when choice.isSelected(4) colors.purple
  when choice.isSelected(5) colors.orange
  otherwise colors.black
▶ 그림판의 처음 색(initialColor)은 choice의 1번 보기가 선택되었다면 colors.red, 2번이면 colors.blue, 3번이면 colors.green, 4번이면 colors.purple, 5번이면 colors.orange, 1~5번 보기 중 어느 것도 선택되지 않았다면 colors.black으로 한다.
initialColor는 처음 선택되어 있는 색을 정하고, isSelected(번호)는 객관식 구성요소에서 그 번호의 보기가 선택되었는지를 참 또는 거짓으로 알려 준다. colors는 Desmos 색들을 담고 있으며 colors.red, colors.blue처럼 Desmos 계산기에서 쓰는 색을 가리키고, when은 조건을 차례로 확인해 처음 맞는 값을 쓴다.

green type:colorPalette:green

Desmos 계산기에서 쓰는 초록색.

원문(영어) 보기

The color green used in the Desmos calculator.

# Based on the choice selected, set the initial color
# to one of the 6 Desmos graph colors.
▷ 선택한 보기에 따라 처음 색을 Desmos 그래프의 6가지 색 중 하나로 정한다.

initialColor:
  when choice.isSelected(1) colors.red
  when choice.isSelected(2) colors.blue
  when choice.isSelected(3) colors.green
  when choice.isSelected(4) colors.purple
  when choice.isSelected(5) colors.orange
  otherwise colors.black
▶ 그림판의 처음 색(initialColor)은 choice의 1번 보기가 선택되었다면 colors.red, 2번이면 colors.blue, 3번이면 colors.green, 4번이면 colors.purple, 5번이면 colors.orange, 1~5번 보기 중 어느 것도 선택되지 않았다면 colors.black으로 한다.
initialColor는 처음 선택되어 있는 색을 정하고, isSelected(번호)는 객관식 구성요소에서 그 번호의 보기가 선택되었는지를 참 또는 거짓으로 알려 준다. colors는 Desmos 색들을 담고 있으며 colors.red, colors.blue처럼 Desmos 계산기에서 쓰는 색을 가리키고, when은 조건을 차례로 확인해 처음 맞는 값을 쓴다.

purple type:colorPalette:purple

Desmos 계산기에서 쓰는 보라색.

원문(영어) 보기

The color purple used in the Desmos calculator.

# Based on the choice selected, set the initial color
# to one of the 6 Desmos graph colors.
▷ 선택한 보기에 따라 처음 색을 Desmos 그래프의 6가지 색 중 하나로 정한다.

initialColor:
  when choice.isSelected(1) colors.red
  when choice.isSelected(2) colors.blue
  when choice.isSelected(3) colors.green
  when choice.isSelected(4) colors.purple
  when choice.isSelected(5) colors.orange
  otherwise colors.black
▶ 그림판의 처음 색(initialColor)은 choice의 1번 보기가 선택되었다면 colors.red, 2번이면 colors.blue, 3번이면 colors.green, 4번이면 colors.purple, 5번이면 colors.orange, 1~5번 보기 중 어느 것도 선택되지 않았다면 colors.black으로 한다.
initialColor는 처음 선택되어 있는 색을 정하고, isSelected(번호)는 객관식 구성요소에서 그 번호의 보기가 선택되었는지를 참 또는 거짓으로 알려 준다. colors는 Desmos 색들을 담고 있으며 colors.red, colors.blue처럼 Desmos 계산기에서 쓰는 색을 가리키고, when은 조건을 차례로 확인해 처음 맞는 값을 쓴다.

orange type:colorPalette:orange

Desmos 계산기에서 쓰는 주황색.

원문(영어) 보기

The color orange used in the Desmos calculator.

# Based on the choice selected, set the initial color
# to one of the 6 Desmos graph colors.
▷ 선택한 보기에 따라 처음 색을 Desmos 그래프의 6가지 색 중 하나로 정한다.

initialColor:
  when choice.isSelected(1) colors.red
  when choice.isSelected(2) colors.blue
  when choice.isSelected(3) colors.green
  when choice.isSelected(4) colors.purple
  when choice.isSelected(5) colors.orange
  otherwise colors.black
▶ 그림판의 처음 색(initialColor)은 choice의 1번 보기가 선택되었다면 colors.red, 2번이면 colors.blue, 3번이면 colors.green, 4번이면 colors.purple, 5번이면 colors.orange, 1~5번 보기 중 어느 것도 선택되지 않았다면 colors.black으로 한다.
initialColor는 처음 선택되어 있는 색을 정하고, isSelected(번호)는 객관식 구성요소에서 그 번호의 보기가 선택되었는지를 참 또는 거짓으로 알려 준다. colors는 Desmos 색들을 담고 있으며 colors.red, colors.blue처럼 Desmos 계산기에서 쓰는 색을 가리키고, when은 조건을 차례로 확인해 처음 맞는 값을 쓴다.

black type:colorPalette:black

Desmos 계산기에서 쓰는 검은색.

원문(영어) 보기

The color black used in the Desmos calculator.

# Based on the choice selected, set the initial color
# to one of the 6 Desmos graph colors.
▷ 선택한 보기에 따라 처음 색을 Desmos 그래프의 6가지 색 중 하나로 정한다.

initialColor:
  when choice.isSelected(1) colors.red
  when choice.isSelected(2) colors.blue
  when choice.isSelected(3) colors.green
  when choice.isSelected(4) colors.purple
  when choice.isSelected(5) colors.orange
  otherwise colors.black
▶ 그림판의 처음 색(initialColor)은 choice의 1번 보기가 선택되었다면 colors.red, 2번이면 colors.blue, 3번이면 colors.green, 4번이면 colors.purple, 5번이면 colors.orange, 1~5번 보기 중 어느 것도 선택되지 않았다면 colors.black으로 한다.
initialColor는 처음 선택되어 있는 색을 정하고, isSelected(번호)는 객관식 구성요소에서 그 번호의 보기가 선택되었는지를 참 또는 거짓으로 알려 준다. colors는 Desmos 색들을 담고 있으며 colors.red, colors.blue처럼 Desmos 계산기에서 쓰는 색을 가리키고, when은 조건을 차례로 확인해 처음 맞는 값을 쓴다.

list type:colorPalette:list

색의 배열(List)을 만든다. 예를 들어 그림판의 사용할 수 있는 색(availableColors)을 정하는 데 쓴다.

원문(영어) 보기

make a list of colors, e.g. for use in setting available colors in sketch

# Create a list of colors using colors.list and
# assign that list of colors to the availableColors
# sink to make a custom palette. The order you list
# them will be the order they appear in the palette.
▷ colors.list로 색 배열을 만들고, 그 색 배열을 availableColors sink에 정해 사용자 지정 팔레트를 만든다. 나열한 순서가 팔레트에 나타나는 순서이다.

availableColors: colors.list(colors.red, colors.green, rgb(163,104,229))
▶ 그림판에서 사용할 수 있는 색(availableColors)은 colors.list(colors.red, colors.green, rgb(163,104,229))로 한다.
availableColors는 그림판에서 쓸 수 있는 색을 정하고, colors.list는 색의 배열을 만들며, rgb(163,104,229)는 세 값으로 색을 만든다.