kevscript / vscolors Goto Github PK
View Code? Open in Web Editor NEWColor Format Converter extension for VSCode. :crystal_ball:
Color Format Converter extension for VSCode. :crystal_ball:
When I highlight rgba(10 10 10 / 10%)
, right-click, and choose "Color to HSL", I get an error saying "Can't resolve color format of rgba(10 10 10 / 10%)".
I have to change it to the legacy format rgba(10, 10, 10, 0.1)
, at which point I can convert it. It generates hsla(0, 0%, 4%, 0.1)
, which is also the legacy format.
But this generates a Stylelint violation "Expected 0.1 to be 10% (alpha-value-notation)". If I make that change, I get "Expected modern color-function notation (color-function-notation)".
Stylelint is expecting the modern format: hsla(0deg 0% 4% / 10%)
; examples are at the link above. (It appears that the deg
is required by a separate rule: hue-degree-notation.)
Would it be possible for the extension to:
deg
in angles, too.)Hey @kevscript, how are you?
Great extension, it's the only color format converter
that really worked perfectly for me.
I'm having a bit of trouble with HEX colors.
When you double click a text to select the color to convert,
VS Code does not include the hashtag character.
Example:
Double click the string:
"#C9533E",
Right click, convert to RGB:
Do you think it would be possible to:
remove the '#' character from the regex,
when converting back, replace the selection + 1 character to the left?
Since 'rgb' and 'hsl' both have the name strings before,
it's very distinguishable from HEX colors, it could work.
If you think it's a good idea or there's a better solution, let me know and I can PR it. =)
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.