prettyprinter icon indicating copy to clipboard operation
prettyprinter copied to clipboard

Support for full color palette

Open ad-si opened this issue 7 years ago • 10 comments
trafficstars

Why is there only support for 16 colors? The full palette would be cool! :grin:

screen shot 2018-07-06 at 17 10 58

ad-si avatar Jul 06 '18 17:07 ad-si

There’s not enough supply or demand for this feature. ;-)

quchen avatar Jun 14 '19 13:06 quchen

😭

ad-si avatar Jun 14 '19 13:06 ad-si

You could easily implement this though if you needed it! Just extend data Color by a field RGB Word8 Word8 Word8 and follow the compiler warnings to implement it. ansi-terminal has support for RGB SGR codes (link), so all in all this should not be a hard thing to implement.

I’m very much open to a pull request if you decided to implement this, but at the moment I’m afraid I don’t have the time myself.

quchen avatar Jun 16 '19 19:06 quchen

Would you still be amenable to a patch in this direction? I just asked the same question and came to the same https://hackage.haskell.org/package/ansi-terminal-0.10.1/docs/System-Console-ANSI-Types.html#v:SetRGBColor constructor which perhaps we can pass through instead? (I note that it's Colour Float there, which is interesting)

istathar avatar Oct 12 '19 13:10 istathar

Yes, I’m open to it! I’d like to keep the feature small though, without too many color management bells and whistles.

quchen avatar Oct 18 '19 10:10 quchen

If @afcowie hasn't got the patch done, I'll do one over the next couple of days.

spacekitteh avatar Jan 24 '20 08:01 spacekitteh

@spacekitteh haven't had a chance yet, sorry.

istathar avatar Jan 24 '20 09:01 istathar

Reopening due to the renewed interest.

sjakobi avatar Jan 24 '20 22:01 sjakobi

Re-closing due to renewed disinterest ;-)

A PR implementing this would still be welcome though.

quchen avatar Dec 03 '21 13:12 quchen

Re-re-opening since there is a PR: #224.

sjakobi avatar Apr 25 '22 19:04 sjakobi