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

feat: export TokenColor helpers #147

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

thisislawatts
Copy link
Member

@thisislawatts thisislawatts commented Apr 18, 2024

Introduce a new TokenColor helper for resolving a token name to a specific Terminal.Color value. This can be adopted by any extensions rendering output to terminal.

Benefits:

  • Introducing tokens for color management allows for centralized control and easy customization of UI styles.
  • It promotes code readability and maintainability by keeping color definitions separated from UI component logic.

Questions:

  • Should our go-application-framework have knowledge of the Terminal Colours? In theory folks could be building any kind of application with these workflows

@thisislawatts thisislawatts marked this pull request as ready for review April 23, 2024 14:53
@thisislawatts thisislawatts requested a review from a team as a code owner April 23, 2024 14:53
}
}

func TokenColor(name string) lipgloss.TerminalColor {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Question: Why do we need this in the public API of the application framework, while it only applies to CLI ASCII escaped UIs?

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