thomasp85 / farver

High Performance Colourspace Manipulation in R
https://farver.data-imaginist.com
Other
128 stars 14 forks source link

Euclidean metric ignores "blue" channel? #20

Closed krlmlr closed 4 years ago

krlmlr commented 4 years ago

I don't know much about colors, black == blue (in Euclidean space) strikes me odd. Is this expected?

farver::compare_colour(farver::decode_colour("#000000"), farver::decode_colour("#0000FF"), "rgb")
#>      [,1]
#> [1,]    0
farver::compare_colour(farver::decode_colour("#000000"), farver::decode_colour("#0000FF"), "rgb", method = "cmc")
#>         [,1]
#> [1,] 212.096

Created on 2020-01-11 by the reprex package (v0.3.0)