ctrl+shift+p filters: :st2 :st3 :win :osx :linux
Browse

color​To​Val

by yh418807968 ALL

将颜色的16进制表示转换为对应的变量名

Details

Installs

  • Total 431
  • Win 310
  • Mac 78
  • Linux 43
Oct 14 Oct 13 Oct 12 Oct 11 Oct 10 Oct 9 Oct 8 Oct 7 Oct 6 Oct 5 Oct 4 Oct 3 Oct 2 Oct 1 Sep 30 Sep 29 Sep 28 Sep 27 Sep 26 Sep 25 Sep 24 Sep 23 Sep 22 Sep 21 Sep 20 Sep 19 Sep 18 Sep 17 Sep 16 Sep 15 Sep 14 Sep 13 Sep 12 Sep 11 Sep 10 Sep 9 Sep 8 Sep 7 Sep 6 Sep 5 Sep 4 Sep 3 Sep 2 Sep 1 Aug 31
Windows 0 0 0 0 0 0 0 0 0 0 0 1 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Mac 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Linux 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

Readme

Source
raw.​githubusercontent.​com

colorToVal

一个输入颜色的16进制可转为对应变量的Sublime Text 3自动完成插件。

插件效果:(colorToVal)

效果演示图

安装(github)

配置参数

参数配置默认文件:Sublime Text -> Preferences -> Package Settings -> colorToVal -> setting-Default

  • exts - 启用此插件的文件类型。默认为:[“.css”, “.scss”, “.less”, “.sass”, “.styl”]。
  • data - 用户自定义的数据。默认举例为: “data”:{

    "$c-bg1":"#dadada",
        "$c-night":"#000",
        "$c-bg2-night":"#000",
        "$c-bg3":"#fff",
    

    }。 用户在setting-User中设置数据后,将覆盖此数据。

用户参数配置文件:Sublime Text -> Preferences -> Package Settings -> colorToVal -> setting-User { “data”:{ //your data here
} } 注:key变量名为,value为16进制色值,一个16进制色值可对应多个变量。

使用

输入16进制色值(可省略#),以字母t为触发快捷键,找到对应的变量,按enter键替换。详情见动图colorToVal.gif

@ youhong SOHU SNS FE-Group