blockly >utils >顏色 >hexToRgb

utils.colour.檢索 ToRgb() 函式

將顏色轉換成 RGB。

Signature:

export declare function hexToRgb(colour: string): number[];

參數

參數 類型 說明
色彩 字串 字串,用於表示任何顏色格式的顏色 ('#ff0000'、'red'、'0xff000' 等)。

傳回:

數字 []

顏色的 RGB。