색상 선택 도구 요소를 생성합니다.
매개변수 value는 선택적(optional)입니다. 색상문자열 또는 p5.Color 객체가 전달되면, 기본 색상을 설정합니다.
색상 선택 도구는 색상을 관리하는 몇 가지 유용한 메서드를 통해 p5.Element 클래스를 확장합니다:
- "
myPicker.value()는 현재 색상을'#rrggbb'형태의 16진수 문자열로 반환합니다. "myPicker.color()는 현재 색상을 p5.Color 객체 형태로 반환합니다.
예제
구문
createColorPicker([value])
매개변수
value
String|p5.Color:
CSS 색상 문자열로 표현되는 기본 색상
Returns
p5.Element: 새로 생성된 p5.Element 객체
This page is generated from the comments in src/dom/dom.js . Please feel free to edit it and submit a pull request!