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
])

这里也有:color_value#Color_keywords

posted @ 2023-06-09 17:01  彼时今日  阅读(33)  评论(0)    收藏  举报