Skip to content

Commit

Permalink
*
Browse files Browse the repository at this point in the history
  • Loading branch information
lainsce authored Feb 4, 2023
1 parent 5982514 commit 1a9dc4d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/Utils/Color.vala
Original file line number Diff line number Diff line change
Expand Up @@ -230,15 +230,15 @@ namespace He.Color {
// Make XYZ fit D65 by adjusting it
double[] RGB = elem_mul(
M16 (color.x, color.y, color.z),
{1.0322048506322774, 0.9856436353674031, 0.8877575015921737}
{1.0322048506322774, 0.9856436353674031, 1}
);
var R_a = adapt(RGB[0]);
var G_a = adapt(RGB[1]);
var B_a = adapt(RGB[2]);

var Aw = 3.49;
var a = R_a + (-12*G_a + B_a) / 11;
var b = (R_a + G_a - 1.8 * B_a) / 8.8;
var b = (R_a + G_a - 2 * B_a) / 9;
var hr = Math.atan2(b, a);
var h = hr * 180/Math.PI;

Expand Down

0 comments on commit 1a9dc4d

Please sign in to comment.