Skip to content

Confution about output mode 216 #118

@mitchellwrosen

Description

@mitchellwrosen
#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 :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions