8000 fix: use ANSI colors codes instead of RGB by DanielleMaywood · Pull Request #14665 · coder/coder · GitHub
[go: up one dir, main page]

Skip to content

fix: use ANSI colors codes instead of RGB #14665

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

Merged
merged 23 commits into from
Sep 17, 2024
Merged
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
5e308df
chore: add command for showing colors
DanielleMaywood Sep 13, 2024
86175bf
fix: use ANSI color codes instead of RGB
DanielleMaywood Sep 13, 2024
098d35d
feat: add '--no-color' flag
DanielleMaywood Sep 13, 2024
3d13060
fix: revert colors
DanielleMaywood Sep 13, 2024
5b8fa3b
chore: change colors
DanielleMaywood Sep 13, 2024
4ce84a4
fix: update golden files
DanielleMaywood Sep 13, 2024
a75dbb2
fix: replace blue with brightBlue
DanielleMaywood Sep 13, 2024
390a7ca
fix: drop '> ' for unfocused prompts
DanielleMaywood Sep 13, 2024
7e6db79
fix: run 'make fmt'
DanielleMaywood Sep 13, 2024
ce913a5
chore: allow disabling color with env flags
DanielleMaywood Sep 13, 2024
22a2d0b
fix: apply fixes from feedback
DanielleMaywood Sep 13, 2024
5e42118
fix: run 'make gen'
DanielleMaywood Sep 13, 2024
40eb24e
fix: refactor janky code
DanielleMaywood Sep 13, 2024
ccf174a
fix: re-add public function
DanielleMaywood Sep 13, 2024
1fbef1d
fix: re-add init for non-color tests
DanielleMaywood Sep 13, 2024
44c3726
fix: move styles to 'init' that can be
DanielleMaywood Sep 13, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: make code and field obey --no-color
  • Loading branch information
DanielleMaywood committed Sep 13, 2024
commit 1babe9662ec82e402b8f1b54b1d559124eda0d19
12 changes: 8 additions & 4 deletions cli/cliui/cliui.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,13 +113,9 @@ func init() {

DefaultStyles.Code = pretty.Style{
ifTerm(pretty.XPad(1, 1)),
pretty.FgColor(color.Color("#ED567A")),
pretty.BgColor(color.Color("#2C2C2C")),
}
DefaultStyles.Field = pretty.Style{
pretty.XPad(1, 1),
pretty.FgColor(color.Color("#FFFFFF")),
pretty.BgColor(color.Color("#2B2A2A")),
}
DefaultStyles.Wrap = pretty.Style{
pretty.LineWrap(80),
Expand All @@ -142,12 +138,20 @@ func Init(opts InitOptions) {
// We do not adapt the color based on whether the terminal is light or dark.
// Doing so would require a round-trip between the program and the terminal
// due to the OSC query and response.
DefaultStyles.Code = append(DefaultStyles. 6FEC Code,
pretty.FgColor(color.Color("#ED567A")),
pretty.BgColor(color.Color("#2C2C2C")),
)
DefaultStyles.DateTimeStamp = pretty.Style{
pretty.FgColor(brightBlue),
}
DefaultStyles.Error = pretty.Style{
pretty.FgColor(red),
}
DefaultStyles.Field = append(DefaultStyles.Field,
pretty.FgColor(color.Color("#FFFFFF")),
pretty.BgColor(color.Color("#2B2A2A")),
)
DefaultStyles.Fuchsia = pretty.Style{
pretty.FgColor(brightMagenta),
}
Expand Down
Loading
0