Skip to content
This repository has been archived by the owner on Nov 29, 2022. It is now read-only.

Full 24-bit color... #61

Closed
cpriest opened this issue Aug 19, 2019 · 5 comments
Closed

Full 24-bit color... #61

cpriest opened this issue Aug 19, 2019 · 5 comments
Labels
question General query

Comments

@cpriest
Copy link

cpriest commented Aug 19, 2019

I'm not sure if this was intended, but if I try to use as the color code, it just puts that code in front of the result. Like 0-9 can't be used for 24-bit color codes.

Is that intended? Could that be changed?

I love the idea that upper case characters indicate background and there is no upper/lower to digits so I could see that being a problem.

Perhaps an extended form would work, like use for the VT100 stuff and [012] for 24 bit color. Could even do something like [f00.000] where the first 3 characters before the optional period are the foreground and the last 3 after the period for background, if present.

Other examples that I would think would work like this:
[.000] - Black background
[f00] - Red foreground
[f00.] - Red foreground
[F00] - Red Background

One other alternate that might make sense (piggyback off css)
#f00000 - Red foreground / black background
#00fFFF - Blue foreground / White background

Thoughts?

@hSaria
Copy link
Owner

hSaria commented Aug 19, 2019

If you want to use custom colors, see ct -d for the list of available colors and man ct on usage, but TL;DR, here's an example:

HIGHLIGHT {Hello World} {<ABA><fbe>}

The main thing with RGB in terminal is its support; isn't as widely supported as the 256 pallet. And while I love colors, having 16 million colors is overkill for what ChromaTerm-- is built for, unless you're planning on adding True Color to telnet-Star-Wars. I'd love it if I could just use normal RGB to make things simple, but for now, we'll have to settle for the 256 pallet.

@hSaria hSaria added the question General query label Aug 19, 2019
@cpriest
Copy link
Author

cpriest commented Aug 19, 2019 via email

@hSaria
Copy link
Owner

hSaria commented Aug 20, 2019

The extended color set is aaa-fff (6^3) which would be 216 permutations. Then you have the 24 shades of Grey (g00-g23). And lastly, the original 16 ANSI colors. 216 + 24 + 16 is 256.

For the extended color set and the shades of Grey, uppercase indicates background while lower is is foreground. For simple ANSI, see man ct on using 000-999 (first character is special actions, second if foreground color, last is background color)

@cpriest
Copy link
Author

cpriest commented Aug 21, 2019

Huh, it never occurred to me that it added up that way, very cool! I have a number of ANSI color reference files/tools to show the palette. They all show a bit differently but since you put it like the above I realized they map in that way. Just never realized it would map cleanly to aaa-fff. Pretty sweet.

@cpriest cpriest closed this as completed Aug 21, 2019
@hSaria hSaria mentioned this issue Aug 26, 2019
@hSaria
Copy link
Owner

hSaria commented Aug 26, 2019

FYI, I'll add RGB support in #65. Following the config changes (#58), this won't be too difficult.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
question General query
Projects
None yet
Development

No branches or pull requests

2 participants