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

color​To​Val

by yh418807968 ALL

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

Details

Installs

  • Total 421
  • Win 302
  • Mac 77
  • Linux 42
Mar 12 Mar 11 Mar 10 Mar 9 Mar 8 Mar 7 Mar 6 Mar 5 Mar 4 Mar 3 Mar 2 Mar 1 Feb 28 Feb 27 Feb 26 Feb 25 Feb 24 Feb 23 Feb 22 Feb 21 Feb 20 Feb 19 Feb 18 Feb 17 Feb 16 Feb 15 Feb 14 Feb 13 Feb 12 Feb 11 Feb 10 Feb 9 Feb 8 Feb 7 Feb 6 Feb 5 Feb 4 Feb 3 Feb 2 Feb 1 Jan 31 Jan 30 Jan 29 Jan 28 Jan 27
Windows 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 1 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 0 0 0 0 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

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