Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pipe color codes to stdout? #3

Open
kflak opened this issue Mar 9, 2022 · 5 comments
Open

Pipe color codes to stdout? #3

kflak opened this issue Mar 9, 2022 · 5 comments

Comments

@kflak
Copy link

kflak commented Mar 9, 2022

Hi,

Thanks for a great program! Is there a way to get the color codes to stdout? Would love to be able to pipe it to clipboard or a file or something else entirely... Alternatively/additionally some way to export to json would be cool too.

@ArthurSonzogni
Copy link
Owner

ArthurSonzogni commented Mar 11, 2022

Technically, the output is written in the interface, which is displayed to stdout.
There are multiple format: HEXA, RGB, HSV.

I can support pipe, so that when rgb-tui output is connected to another program, we draw the UI to the terminal output, and print the result toward the piped program.

Out of curiosity, what kind of use case do you have?

@kflak
Copy link
Author

kflak commented Mar 11, 2022

My main use case is to get color values to the clipboard, so that I can put them into whatever code I am writing, whether that is in openFrameworks or my website. So an ideal scenario could look like this: press h to copy the hex values to the clipboard, r to get the rgb values, and h for hsv values. Or some other keyboard combination. Of course it could be interesting to pipe this through to other programs as well, might even be a fun way to control interactively the colors of a running program...? Just fantasizing here... but a pipe would definitely open up interesting possibilities for all kinds of applications.

EDIT: Oh wow, just discovered that you have implemented vi keybindings to navigate the color space! Awesome!

@nkh
Copy link

nkh commented Mar 1, 2023

I second this, getting the colors without having to type them makes this much more usable.

I also noticed that it's not possible to change the colors by changing the values directly, did I miss something?

ArthurSonzogni added a commit that referenced this issue Jun 2, 2024
ArthurSonzogni added a commit that referenced this issue Jun 2, 2024
ArthurSonzogni added a commit that referenced this issue Jun 2, 2024
@ArthurSonzogni
Copy link
Owner

I added support for the clipboard, does it resolve this issue somehow?

@nkh
Copy link

nkh commented Jun 2, 2024

@ArthurSonzogni somehow but the clipboard is not stdout

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants