Skip to content

Use color for highlighted word #10

@TablesawTablesawsen

Description

@TablesawTablesawsen

The underscores don't pop for me very well in my terminal (particularly when more of the grid has been filled in), so I'd like to be able to add color. Right now I have a fork with this code:

    def draw_highlighted_cell(self, position):
        value, markup = self.compile_cell(position)
        value = self.term.green_underline(value) + markup
        print(self.term.move(*self.to_term(position)) + value)

    def draw_cursor_cell(self, position):
        value, markup = self.compile_cell(position)
        value = self.term.green_reverse(value) + markup
        print(self.term.move(*self.to_term(position)) + value)

I'm not familiar with blessed, and I'm not sure if there's an elegant way to slot in a color (other than using getattr on a concatenated string).

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