Skip to content

Commit

Permalink
fix: 二维码颜色错误问题
Browse files Browse the repository at this point in the history
  • Loading branch information
chenxuuu committed May 25, 2022
1 parent 98ee00e commit 51a5408
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions BBDown/ConsoleQRCode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,10 @@ public void GetGraphic(ConsoleColor darkColor, ConsoleColor lightColor)
{
for (int x = 0; x < QrCodeData.ModuleMatrix[y].Count; x++)
{
Console.BackgroundColor = QrCodeData.ModuleMatrix[y][x] ? ConsoleColor.White : ConsoleColor.Black;
Console.Write(" ");
Console.ForegroundColor = QrCodeData.ModuleMatrix[y][x] ? darkColor : lightColor;
Console.Write("██");
}
Console.BackgroundColor = darkColor;
Console.WriteLine("");
}
Console.BackgroundColor = previousBackColor;
Expand Down

0 comments on commit 51a5408

Please sign in to comment.