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

Confution about output mode 216 #118

Open
mitchellwrosen opened this issue Sep 10, 2018 · 0 comments
Open

Confution about output mode 216 #118

mitchellwrosen opened this issue Sep 10, 2018 · 0 comments

Comments

@mitchellwrosen
Copy link

#include <assert.h>
#include "termbox.h"

int main() {
  struct tb_event event;

  assert ( tb_init() == 0 );

  tb_select_output_mode(TB_OUTPUT_216);

  tb_clear();
  tb_change_cell(0, 0, 'x', TB_DEFAULT, 20);
  tb_present();

  tb_poll_event(&event);
  tb_shutdown();
}

The above program draws a single x at coords 0,0, then exits when a key is pressed. Notice that the foreground attribute is TB_DEFAULT and the background is 20. When I run this program, I see an orange x on a blue background. This seems to suggest that my default foreground color is orange.

However, when I set both the foreground and background to TB_DEFAULT, I see a white x on a blackish (unaltered from my normal terminal) background.

Why is this? Thanks :)

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

1 participant