chinchiheather / vscode-margin-colours

Visual Studio Code extension to display colour badge next to line numbers when any hex, rgb(a) or hsl(a) colours are written in a file
7 stars 5 forks source link

do you plan to support dart language? #11

Open phpmaple opened 5 years ago

gcamp806 commented 4 years ago

The main difference is the leading alpha value before the standard RGB values. For example: static const lightGreyBlue = const Color(0xff91bde2);

chinchiheather commented 4 years ago

I am not familiar with Dart - by adding support, do you just mean support that number type?

It looks like it is a different format to the 8 digit hex you can use in CSS in Chrome. They have it the other way round where the last 2 digits represent the alpha.

In theory I have no problems adding support for it, but if it using a different format it gets trickier.

gcamp806 commented 4 years ago

Yes, supporting that 8-digit hex number type to display the color. If you are able to filter on filename extension, this number format will appear in files with the .dart extension. And all dart source code files have the same .dart extension.

airtonix commented 8 months ago

there's two issues here:

  1. the filetype
  2. the colour format, which is the same as css #RRGGBBAA

The meat of this issue is #2.

to that end we should look at moving away from the regexp and find a more complete colour solution.