name-that-color-intellij-plugin
name-that-color-intellij-plugin copied to clipboard
Make plugin work with other Jetbrains IDEs (not just Android Studio)
I love http://chir.ag/projects/name-that-color and this plugin could be awesome... sadly I am not using Android Studio but PHPStorm, so I can't use it :sob:
I have no idea how much work it will be, but would it be possible to create a version of this plugin that works with other IDEs, not just Android Studio?
Hello @Potherca ,
Sounds doable! All this plugin does to target Android is to add "triggers" in an xml file containing <resources></resources>
tags.
On what platform/language are you working on and how are colors defined in your project?
I use PHPStorm (WebStorm is similar). Colors occur mostly in CSS, Sass (CSS) or Less files. They occur as values to keys like:
color: #00FF00;
There is all sorts of functionality related to color in CSS files (and similar) but no way (that I know of) to add/convert to "name that color".
Can you show me an example of how you define and use named colors in css?
Ping @Potherca :)
Sorry about the delay, with the whole Corona thing going on and changing jobs to join @pdsinterop, this got shuffled to the bottom of the deck.
CSS defines values for properties, for instance, if I want an HTML page to be red with white letters, I would define:
body {
color: #FFF;
background-color: #F00;
}
Instead of #F00
I could also use rgb(255, 0, 0);
, hsl(0, 100%, 50%);
or simply red
.
All available colors are listed at MDN
There is a UI element in PHPStorm that provides some functionality:
(Image taken from the PHPStorm manual entry on stylesheets)
Changing jobs also meant changing laptops. Currently I am working mostly in Cloud9 IDE and VSCode.
As soon as I have PHPStorm installed and set up, I could add some examples and screenshots for futher clarity if needed...