Skip to content

Commit

Permalink
Fix typo in DE_2000 test data (#499)
Browse files Browse the repository at this point in the history
  • Loading branch information
kimikage committed May 11, 2024
1 parent b10ccc1 commit 0dafd5b
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions test/colordiff.jl
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ using Colors, Test
((50.0000, 2.5000, 0.0000), (50.0000, 3.2972, 0.0000), 1.0000),
((50.0000, 2.5000, 0.0000), (50.0000, 1.8634, 0.5757), 1.0000),
((50.0000, 2.5000, 0.0000), (50.0000, 3.2592, 0.3350), 1.0000),
((60.2574, -34.0099, 36.2577), (60.4626, -34.1751, 39.4387), 1.2644),
((63.0109, -31.0961, -5.8663), (62.8187, -29.7946, -4.0864), 1.2530),
((60.2574, -34.0099, 36.2677), (60.4626, -34.1751, 39.4387), 1.2644),
((63.0109, -31.0961, -5.8663), (62.8187, -29.7946, -4.0864), 1.2630),
((61.2901, 3.7196, -5.3901), (61.4292, 2.2480, -4.9620), 1.8731),
((35.0831, -44.1164, 3.7933), (35.0232, -40.0716, 1.5901), 1.8645),
((22.7233, 20.0904, -46.6940), (23.0331, 14.9730, -42.5619), 2.0373),
Expand All @@ -45,13 +45,14 @@ using Colors, Test
((2.0776, 0.0795, -1.1350), ( 0.9033, -0.0636, -0.5514), 0.9082)]


eps_cdiff = 0.01
eps_cdiff = 0.00005

@testset "CIEDE2000" begin
metric = DE_2000()
for (a, b, dexpect) in abds
@test abs(dexpect - colordiff(Lab(a...), Lab(b...); metric=metric)) < eps_cdiff
@test abs(dexpect - colordiff(Lab(b...), Lab(a...); metric=metric)) < eps_cdiff
a64, b64 = Lab(a...), Lab(b...)
@test colordiff(a64, b64; metric=metric) dexpect atol=eps_cdiff
@test colordiff(b64, a64; metric=metric) dexpect atol=eps_cdiff
end
end

Expand Down

0 comments on commit 0dafd5b

Please sign in to comment.