weslly / ColorPicker

Color picker for Sublime Text
http://weslly.github.io/ColorPicker
511 stars 108 forks source link

Make uppercase letters in hex characters the default, add option to change #57

Closed MattDMo closed 10 years ago

MattDMo commented 10 years ago

Hi @weslly I've been a big fan of your plugin for a while, and I have a new feature to suggest. Depending on the platform (I think), the actual color picker GUI plugin produces either upper or lowercase letters, so you can get different results on different machines. I added logic to sublimecp.py to check for ColorPicker.sublime-settings and see if the "color_upper_case" value is true or false, and depending on that it calls the built-in .upper() or .lower() function on the color variable before it gets sent to the view for replacement.

In addition, I created a sample ColorPicker.sublime-settings file with "color_upper_case" set to true, made a Main.sublime-menu file to add the appropriate items to the Preferences -> Package Settings menu, and updated the documentation in the README as well as the gh-pages branch (that'll be a separate pull request).

I hope you like it, please let me know if you need anything else.

Matt

weslly commented 10 years ago

Thanks!