Class ColorBuilder
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
자세한 문서
asRgbColor()
이 색상을 RgbColor
로 변환합니다.
리턴
RgbColor
: RGB 색상입니다.
생성 값
Error
: 색상이 RgbColor
이 아닌 경우
승인
이 메서드를 사용하는 스크립트에는 다음 범위 중 하나 이상의 승인이 필요합니다.
-
https://www.googleapis.com/auth/spreadsheets.currentonly
-
https://www.googleapis.com/auth/spreadsheets
asThemeColor()
이 색상을 ThemeColor
로 변환합니다.
리턴
ThemeColor
: 테마 색상입니다.
생성 값
Error
: 색상이 ThemeColor
가 아닌 경우
승인
이 메서드를 사용하는 스크립트에는 다음 범위 중 하나 이상의 승인이 필요합니다.
-
https://www.googleapis.com/auth/spreadsheets.currentonly
-
https://www.googleapis.com/auth/spreadsheets
build()
빌더에 제공된 설정에서 색상 객체를 만듭니다.
리턴
Color
: 이 빌더에서 생성된 색상 객체입니다.
getColorType()
이 색상의 유형을 가져옵니다.
리턴
ColorType
: 색상 유형입니다.
승인
이 메서드를 사용하는 스크립트에는 다음 범위 중 하나 이상의 승인이 필요합니다.
-
https://www.googleapis.com/auth/spreadsheets.currentonly
-
https://www.googleapis.com/auth/spreadsheets
setRgbColor(cssString)
RGB 색상으로 설정합니다.
매개변수
이름 | 유형 | 설명 |
cssString | String | CSS 표기법의 RGB 색상 (예: '#ffffff') |
리턴
ColorBuilder
: 체이닝을 위한 이 빌더
setThemeColor(themeColorType)
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2025-07-26(UTC)
[null,null,["최종 업데이트: 2025-07-26(UTC)"],[],["ColorBuilder facilitates creating color objects using `SpreadsheetApp.newColor()`. It allows conversion to `RgbColor` or `ThemeColor`. Key actions include `build()` to create a color object, `getColorType()` to retrieve the color type, `setRgbColor(cssString)` to define an RGB color, and `setThemeColor(themeColorType)` to define a theme color. Methods may require specific authorization scopes like `spreadsheets.currentonly` or `spreadsheets`. The builder can be chained.\n"],null,[]]