Skip to content

Commit

Permalink
cultivation for base avatar & weapon
Browse files Browse the repository at this point in the history
  • Loading branch information
Lightczx committed Dec 17, 2022
1 parent 958fecd commit eed89b2
Show file tree
Hide file tree
Showing 24 changed files with 776 additions and 114 deletions.
2 changes: 1 addition & 1 deletion src/Snap.Hutao/Snap.Hutao/App.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<Color x:Key="CompatBackgroundColor">#FFF4F4F4</Color>
</ResourceDictionary>
<ResourceDictionary x:Key="Dark">
<Color x:Key="CompatBackgroundColor">#FF272727</Color>
<Color x:Key="CompatBackgroundColor">#FF242424</Color>
</ResourceDictionary>
</ResourceDictionary.ThemeDictionaries>

Expand Down
17 changes: 0 additions & 17 deletions src/Snap.Hutao/Snap.Hutao/Control/Image/Bgra8.cs
Original file line number Diff line number Diff line change
Expand Up @@ -75,21 +75,4 @@ public static Bgra8 FromRgb(byte r, byte g, byte b)
{
return new(b, g, r, 0xFF);
}

/// <summary>
/// 加入噪声
/// </summary>
/// <param name="source">源</param>
/// <returns>噪声</returns>
public static Bgra8 Noise(Bgra8 source)
{
Bgra8 target = new(0, 0, 0, 0)
{
B = (byte)Math.Max(0, Math.Min(255, source.B + Random.Shared.Next(-20, 20))),
G = (byte)Math.Max(0, Math.Min(255, source.G + Random.Shared.Next(-20, 20))),
R = (byte)Math.Max(0, Math.Min(255, source.R + Random.Shared.Next(-20, 20))),
A = source.A,
};
return target;
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// <auto-generated />
using System;
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable
Expand Down
Loading

0 comments on commit eed89b2

Please sign in to comment.