nvim-colorizer.lua icon indicating copy to clipboard operation
nvim-colorizer.lua copied to clipboard

Feature Request:

Open Chaitanyabsprip opened this issue 3 years ago • 8 comments

should support hex string like "0xAARRGGBB" etc

Chaitanyabsprip avatar Apr 26 '21 23:04 Chaitanyabsprip

Duplicate/related: #33

What kind of format is AARRBBGG?!

rYR79435 avatar May 11 '21 18:05 rYR79435

The format is used in flutter app and web dev. There might be other but I'm only familiar with this one. Perhaps there could be a way to set a custom string matcher? That'll solve the issue for any and every format of color codes.

Chaitanyabsprip avatar May 12 '21 11:05 Chaitanyabsprip

Huh, I've never seen that before, only RRGGBBAA. That's also whats already implemented for "#". The presence of both might be a bit of an issue when autodetecting.

rYR79435 avatar May 12 '21 20:05 rYR79435

you match for hex color values starting with # right, I am asking for support for 0x as the prefix

Chaitanyabsprip avatar May 13 '21 17:05 Chaitanyabsprip

also, AARRGGBB https://api.flutter.dev/flutter/dart-ui/Color-class.html

Chaitanyabsprip avatar May 13 '21 17:05 Chaitanyabsprip

you match for hex color values starting with # right, ...

Wrong. I'm asking for 0x as an alternative for #.

That's also whats already implemented for "#". The presence of both might be a bit of an issue when autodetecting.only knowsonly knowsonly knows

If 0x and # are interchangeable, then 0xFFFFFF00 would be FFFFFF with alpha 00, because # assumes RRGGBBAA. That would conflict with your request.

rYR79435 avatar May 13 '21 19:05 rYR79435

determine the color format based on filetype?

Chaitanyabsprip avatar May 14 '21 10:05 Chaitanyabsprip

0x is in some c libraries as well such as raylib like so Color red = GetColor(0xFF0000);

RaafatTurki avatar May 29 '21 17:05 RaafatTurki