Skip to content

Want to handle color more flexibly for individual cells in HTML #356

@gdamore

Description

@gdamore

I have tables where the color of a single cell is based on a status (e.g. "UP" is green, and "DOWN" is red). (I'm using color.Sprint() generally for this, or sometimes color.Sprintf.)

Unfortunately the HTML colorizer doesn't understand this, and just puts the ANSI escapes right into the HTML.

Further, I don't see a mechanism like color.Sprint() ... it would be workable if I could do color.SprintHTML() or something that would emit a . ... but setting the class on the TD or TH element works well too. Provided that I can have per-cell tunability of this.

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