Skip to content

Commit 4606b3d

Browse files
authored
Use #7a7a7a as the grey color in AIShell to meet the contrast requirement (#333)
1 parent 6a73825 commit 4606b3d

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

shell/AIShell.Kernel/Host.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,7 @@ public async Task<T> PromptForSelectionAsync<T>(string title, IEnumerable<T> cho
419419
.Title(title)
420420
.PageSize(10)
421421
.UseConverter(converter)
422-
.MoreChoicesText("[grey](Move up and down to see more choices)[/]")
422+
.MoreChoicesText("[#7a7a7a](Move up and down to see more choices)[/]")
423423
.AddChoices(choices);
424424

425425
return await selection.ShowAsync(ansiConsole, cancellationToken).ConfigureAwait(false);
@@ -468,7 +468,7 @@ public async Task<string> PromptForTextAsync(string prompt, bool optional, IList
468468
RequireStdoutOrStderr(operation);
469469

470470
IAnsiConsole ansiConsole = _outputRedirected ? _stderrConsole : AnsiConsole.Console;
471-
string promptToUse = optional ? $"[grey][[Optional]][/] {prompt}" : prompt;
471+
string promptToUse = optional ? $"[#7a7a7a][[Optional]][/] {prompt}" : prompt;
472472
var textPrompt = new TextPrompt<string>(promptToUse) { AllowEmpty = optional };
473473

474474
if (choices?.Count > 0)

shell/AIShell.Kernel/Shell.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,8 +132,10 @@ internal void ShowBanner()
132132
{
133133
string banner = _wrapper?.Banner is null ? "AI Shell" : _wrapper.Banner;
134134
string version = _wrapper?.Version is null ? _version : _wrapper.Version;
135+
136+
// The color '#7a7a7a' is most close to 'grey' but with high enough contrast to pass the contrast checker.
135137
Host.MarkupLine($"[bold]{banner.EscapeMarkup()}[/]")
136-
.MarkupLine($"[grey]{version.EscapeMarkup()}[/]")
138+
.MarkupLine($"[#7a7a7a]{version.EscapeMarkup()}[/]")
137139
.WriteLine();
138140
}
139141

@@ -286,7 +288,7 @@ private void LoadAvailableAgents()
286288
chosenAgent ??= _agents.Count is 1
287289
? _agents[0]
288290
: Host.PromptForSelectionAsync(
289-
title: "Welcome to AI Shell! We’re excited to have you explore our [bold]Public Preview[/]. Documentation is available at [link=https://aka.ms/AIShell-Docs]aka.ms/AIShell-Docs[/], and we’d love to hear your thoughts - share your feedback with us at [link=https://aka.ms/AIShell-Feedback]aka.ms/AIShell-Feedback[/].\n\n[orange1]Please select an AI [Blue]agent[/] to use[/]:\n[grey](You can switch to another agent later by typing [Blue]@<agent name>[/])[/]",
291+
title: "Welcome to AI Shell! We’re excited to have you explore our [bold]Public Preview[/]. Documentation is available at [link=https://aka.ms/AIShell-Docs]aka.ms/AIShell-Docs[/], and we’d love to hear your thoughts - share your feedback with us at [link=https://aka.ms/AIShell-Feedback]aka.ms/AIShell-Feedback[/].\n\n[orange1]Please select an AI [Blue]agent[/] to use[/]:\n[#7a7a7a](You can switch to another agent later by typing [Blue]@<agent name>[/])[/]",
290292
choices: _agents,
291293
converter: static a => a.Impl.Name)
292294
.GetAwaiter().GetResult();

0 commit comments

Comments
 (0)