galex / name-that-color-intellij-plugin Goto Github PK
View Code? Open in Web Editor NEWThis plugin lets you insert a name for a color you copy-paste or type in an android resource file.
This plugin lets you insert a name for a color you copy-paste or type in an android resource file.
Why not continue updating
After fix for #5 and adding Material Design colors, one name can mean different colors:
#FFEBEE
gives red_50
as per Material Design palette#80FF0000
gives red_50
as "red with 50% opacity"Maybe it's better to use "red50" (no underscore) for Material Design colors, keep "red_50" for transparent colors.
Plugin version 1.2.0
Android Studio version 3.0.1
As mentioned in this Reddit post, the same functionality would be useful for the Material Colors.
For this the project will become a library module which will build two plugins:
When a color is copied inside the document, provide a quickfix so the user does not need to move its carret till the text to apply the quickfix
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 ๐ญ
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?
Steps to reproduce:
Actual result:
Warnings
Expected result:
No warnings
Android Studio 4.0
Build #AI-193.6911.18.40.6514223, built on May 20, 2020
Plugin Error: Plugin "Name That Color" is incompatible (target build range is 171 to 192.*).
Update the readme with two new gifs / images:
Show those for normal colors and for material colors.
Build the plugin by using the Gradle IntelliJ Plugin to manage the project
Great plugin! I'd love to have the ability to change existing color names into their "real" color names instead of the ones we currently use. Would be awesome!
I used #6002ee and #5300e8 these colors and choose name that material color and for the both colors it used deep_purple_a700 this name, also the name of theses color on material.io is purple 500 and purple 600.
Android Studio 4.2 Canary 7
Build #AI-201.7846.76.42.6720134, built on July 30, 2020
When I updating the latest Android studio version 4.1,this plugin shows error for supportd only in intellij IDEA message in event log
could u just fix this issue?
Android Studio 3.5 based on IntelliJ IDEA 2019.1 (191.6183.*) released at March 2019
The current version works only if I manually change restriction in META-INF/plugin.xml
I found one problem when I name the color of #444444
.
"mine_shaft" was given by plugin, the same as the color of #222222
, but they are a little bit different.
Then I input #444444
on the website name that color, but I got the name of "Tundora".
Steps to reproduce:
println(ColorNameFinder.findColor(HexColor("#444444")))
Actual result:
(#444444, Color(hexCode=323232, name=Mine Shaft, rgb=Rgb(r=50, g=50, b=50), hsl=Hsl(h=0, s=0, l=20)))
Expected result:
(#444444, Color(hexCode=4A4244, name=Tundora, rgb=Rgb(r=74, g=66, b=68), hsl=Hsl(h=345, s=6, l=27)))
I think the problem is at this line after I checked the source of ntc:
Let's look at the HSL value of three colors:
#4A4244 Rgb(r=74, g=66, b=68) Hsl(h=345, s=6, l=27)
#323232 Rgb(r=50, g=50, b=50) Hsl(h=0, s=0, l=20)
#444444 Rgb(r=68, g=68, b=68) Hsl(h=0, s=0, l=27)
Because H
in HSL represents a degree, the delta value between #4A4244
and #444444
should be 15
but not 345
. As a result, it makes #323232
be the closest color to #444444
.
The fix should be something like this:
private fun deltaOfTwoDegree(l: Int, r: Int): Int {
var delta = abs(l - r)
if (delta >= 180) {
delta = (360 - delta)
}
return delta
}
Hope it helps.
Find and fix use of "place" parameter in CompletionContributor.extend()
.
Especially the fact that what can be seen in the PsiViewer elements does not seem to be correct.
PsiWhiteSpace
inside xmlText
inside xmlTag
with name resources
PsiWhiteSpace
inside xmlText
PsiWhiteSpace
Not compatible with the version of your running IDE (Android Studio Hedgehog | 2023.1.1)
Plugin is not showing autocomplete items for ARGB value.
Steps to reproduce:
#80FAFAFA
(alabaster, 50% alpha) to the clipboardcolors.xml
-> No suggestions
message is displayedExpected behavior: plugin autocompletes to
<color name="alabaster_50">#80fafafa</color>
where 50
is a transparency value.
After installing this plugin I noticed repeated freezes while typing code, waiting doesn't work.
After killing AS and reopening I also notice that the last few files edited were reverted, which adds to the severity of the problem.
Disabling the plugin made AS usable again.
Tried on AS 3.0.1 stable and 3.1 beta 4.
this is version of android studio I use
Android Studio 4.1.2
Build #AI-201.8743.12.41.7042882, built on December 20, 2020
Runtime version: 1.8.0_242-release-1644-b01 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Windows 10 10.0
GC: ParNew, ConcurrentMarkSweep
Memory: 8158M
Cores: 4
Registry: ide.new.welcome.screen.force=true, external.system.auto.import.disabled=true, ide.balloon.shadow.size=0
Non-Bundled Plugins: PlantUML integration, com.intellij.apacheConfig, CheckStyle-IDEA, org.jetbrains.kotlin, com.codota.csp.intellij, com.potterhsu.jsonviewer, mobi.hsz.idea.gitignore, com.chrisrm.idea.MaterialThemeUI, izhangzhihao.rainbow.brackets, com.atlassian.bitbucket.references, wu.seal.tool.jsontokotlin
When a color is selected in the document and it is not inside a color xml tag already, provide the auto completion on a valid hexadecimal color text.
Plugin doesn't work with colors written in lowercase:
#fafafa
gives no suggestions but #FAFAFA
gives alabaster
and grey_50
#2a000000
gives no suggestions but #2A000000
gives black_16
Plugin version 1.2.0
Android Studio version 3.0.1
I can't find shortcut customisation feature. Is it there?
The Plugin isn't working in the latest version of Android Studio (no context dialog is showed).
Android Studio 3.2.1
Build #AI-181.5540.7.32.5056338, built on October 9, 2018
JRE: 1.8.0_152-release-1136-b06 x86_64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
macOS 10.14
Plugin Version: v0.9.1 updated 03.02.18
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.