Convert HEX to closest X11 Color Number

后端 未结 5 1723
醉梦人生
醉梦人生 2021-02-01 08:43

I\'m looking for a Algorithm/Way to convert given HEX (e.g. #111111 R:0x11, G:0x11, B:0x11) to the closest X11 color number (Terminal is either 88 or 256 colors) using either Py

5条回答
  •  一个人的身影
    2021-02-01 09:27

    Go to Wolfram Alpha, type in your hex value i.e. "#acdffa". Go to the section called "Nearest named HTML colors"

    I know this isn't code but you did say "algorithm/way".

    Cheers

提交回复
热议问题