Skip to content

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

Mahi: parseHexColor() ​

parseHexColor(input): string

Beta

Whakamanaia, ā, whakaritea kia tika te tae hex nā te kaiwhakamahi i tuku. Koinei anake te tomokanga mō ngā urunga kāore e whakawhirinaki ki roto i te CSS i hangaia, nō reira ka whakakorehia ngā mea katoa anō i tua atu i #rgb/#rrggbb.

Ngā Tawhā ​

input ​

string

A hex color, with or without the leading #.

Whakahokia ​

string

Lowercase #rrggbb.

Whiua ​

TypeError ina kāore input he tae hex 3- rānei 6-waehere.