Skip to content

pantoken-root / plugins/pantoken/custom-theme-colors/src / customColorCss

함수: customColorCss() ​

customColorCss(hex, options?): string

베타

브랜드 헥스에 대한 [data-pantoken-color="custom"] 규칙을 생성합니다: 파생된 --instui-primitive-color-custom-custom* 단계를 선언하고 브랜드 프리미티브를 정확히 제공된 스케일과 같이 그것들에 재매핑합니다 .

매개변수 ​

hex ​

string

#rgb/#rrggbb 브랜드 색상.

options? ​

CustomColorCssOptions = {}

CustomColorCssOptions.

반환값 ​

string

CSS 규칙 문자열.

예외 ​

TypeError: hex이(가) 유효한 헥스 색상이 아닐 때.