colourista icon indicating copy to clipboard operation
colourista copied to clipboard

Ability to choose any RGB color

Open dariodsa opened this issue 4 years ago • 1 comments

As I saw currently user can only select colours mentioned in this data type.

https://github.com/feuerbach/ansi-terminal/blob/5d65f48485182320ea05f90b5b002003515c089b/src/System/Console/ANSI/Types.hs#L39-L47

There shouldn't be too difficult to add additional function and maybe data type to wrap Colour from colour package so that user can write a message with any foreground or background colour (thanks to the this line). That would require to add colour package in the dependency list and to add some additional function available for users. If you think that this is a good idea, I can start working on this. :christmas_tree: :santa: :gift:

dariodsa avatar Dec 25 '20 20:12 dariodsa

Hi @dariodsa! I see that the SGR data type from the ansi-terminal library has the SetRGBColor constructor, that allows specifying the colour in RGB.

I don't mind introducing a function called rgb (as well as impure analogue in the spirit of our API). Feel free to start working on this 🙂 That would be really appreciated! ❤️

chshersh avatar Dec 27 '20 12:12 chshersh