CSS默认支持颜色名称列表

详见 The syntax 中的 named-color

/**
*  @return Array<string[]>
*/
Array.from($(".named-color-table").children[1].children).map(tr => [
    // name
    tr.children[2].innerText,
    // hex rgb
    tr.children[3].innerText,
    // decimal
    tr.children[4].innerText
])
posted @ 2023-06-09 17:01  彼时今日  阅读(17)  评论(0编辑  收藏  举报