Closed Kristinita closed 6 years ago
This is a good idea, I will add this feature(HEX -> Css_Color_Name)
in the next version.
I did not consider this feature before because the css color name is not much, only 147.
@Kristinita The latest version 2.1.0 has been released, but it cannot be installed using package control at present.
so if you really want to experience this new feature, I suggest you directly clone this library into your sublime package directory(menu->preferences->browse packages) and restart the sublime.
Thank you for using my plugin.
@zhouyuexie ,
Status: :exclamation: Another problem
It would be nice, if CSS3 color names will be in lowercase.
Default Sublime Text CSS3 syntax highlight only lowercase CSS3 color names.
I select #ff0000
→ I run command color_convert_hex_to_name
.
red
highlight.
Red
doesn't highlight.
Thanks.
@zhouyuexie , notes:
Thanks.
@Kristinita
Thank you for your feedback and guidance.
This is my first sublime package and I haven't been exposed to this kind of release process before, and I'm sorry if this bug has caused some of your other problems.
I will try to fix this issue and understand the release mechanism as soon as possible.
@zhouyuexie , ping.
Can you make CSS color names lowercase?
Thanks.
@Kristinita you mean?
and if someone needs colorName capitalization, then corresponds to the whole name capitalization or hum capitalization?
@zhouyuexie , answers:
Hex->colorName, the colorName is lowercase.
Yes, I meant it.
make all colorNames lowercase in the file.
Also, it would be nice if would be possible convert all HEX → colorName for file.
and if someone needs colorName capitalization, then corresponds to the whole name capitalization or hum capitalization?
I do not know the arguments why capitalization is needed. my opinion — if any user argues for the need for capitalization, then we can think about it.
Thanks.
@Kristinita The capitalization configuration takes into account some people’s habits, so I kept it.
A 2.2.0 version has just been updated, and colorName can be controlled by capitalization configuration.
The version adding full file conversion: Hex->colorName
Capitalization defaults to false, so you can leave it alone.
Hope you will like it.😝
@zhouyuexie ,
Status: :broken_heart: Partially fixed
HEX colors, that contains 3 symbols after hash, doesn't convert to CSS color names.
Example SashaConvert.css
file:
body {
color: #fff;
color: #ffffff;
color: #f00;
color: #ff0000;
}
I run command color_convert_all_hex_to_name
.
body {
color: white;
color: white;
color: red;
color: red;
}
body {
color: #fff;
color: white;
color: #f00;
color: red;
}
Thanks.
@zhouyuexie ,
Status: :exclamation: Another problem
ARGB colors incorrect convert.
Example SashaARGB.css
file:
body {
color: #f0808077;
}
I run command color_convert_all_hex_to_name
.
No convert ARGB:
body {
color: #f0808077;
}
Bug:
body {
color: lightcoral77;
}
Thanks.
@Kristinita It has been confirmed that these problems do exist, I will immediately repair it.
Will notify you the first time after the repair is completed, thank you.
@Kristinita the new version v2.3.0 is publish.
I hope that these repairs will meet your expectations.
@zhouyuexie ,
Status: :exclamation: Another problem
ARGB colors convert to CSS color names. This should not be.
First 2 symbols in ARGB — transparency.
Example: #80FFFFFF
— 50% transparency for white color
More details:
Configuration, steps to reproduce and expected behavior as in previous section.
f0
in #f0808077
— transparency for #808077
color, not for lightcoral
.
body {
color: lightcoral;
}
Thanks.
@Kristinita Hex containing transparency is not the same format in android and css, sorry to ignore this detail.
the new version v2.3.1 is publish.
@Kristinita The new versions 2.3.1 add config 'is_android', you should change is to 'true'.
the package.io website is break, so may need to wait for a while
❔ Question
Hex containing transparency is not the same format in android and css
Where I can read about it in more details?
Thanks.
Syntax like #RRGGBB[AA]
, more info: [color_value](https://developer.mozilla.org/en-US/docs/Web/CSS/color_value#rgb()_and_rgba())
Syntax like #[AA]RRGGBB
, more info: android color
@zhouyuexie,
Status: :x: Still doesn't work for me
Example:
If user wrote #ff000080
, it means that he want red
color with 50% transparency, not just red
. #ff000080
not must convert to red
, because in red
no transparency.
Thanks.
My fault, I thought you need this conversion....
Will notify you the first time after the repair is completed.
@Kristinita Version 2.3.3 has been released.
Major increase loss_transparent setting, does not allow the loss of transparency in hex_to_colorname
conversion by default.
@Kristinita Version 2.3.3 has been released.
Major increase loss_transparent setting, does not allow the loss of transparency in hex_to_colorname
conversion by default.
Status: :heavy_check_mark: Fixed for me
Thanks.
1. Summary
It would be nice, if would be possible convert from any format to CSS3 color names.
Example:
from HEX to CSS3 color names:
#4b0082
indigo
2. Argumentation
CSS3 color names — format for humans, not for bots. I don't remember HEX, RGB and HSL of red color, but I remember, that it
red
.Situations, where I need CSS3 color names:
Thanks.