Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Banane9 committed Dec 19, 2024
1 parent 4972e82 commit 5162403
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions CommunityBugFixCollection/GammaCorrectedColorXLuminance.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
using Elements.Core;
using HarmonyLib;
using MonkeyLoader.Resonite;
using System;
using System.Collections.Generic;
using System.Text;

namespace CommunityBugFixCollection
{
[HarmonyPatchCategory(nameof(GammaCorrectedColorXLuminance))]
[HarmonyPatch(typeof(colorX), nameof(colorX.Luminance), MethodType.Getter)]
internal sealed class GammaCorrectedColorXLuminance : ResoniteMonkey<GammaCorrectedColorXLuminance>
{
public override bool CanBeDisabled => true;

private static bool Prefix(colorX __instance, out float __result)
{
__result = __instance.ConvertProfile(ColorProfile.Linear).BaseColor.Luminance;

return false;
}

private static bool Prepare() => Enabled;
}
}

0 comments on commit 5162403

Please sign in to comment.