This assumes that hex reperesents colors on a continuous-scale where the domain varies uniformly from 0 to 1.

pev_hex_derivative(hex, method = "cie2000")

Arguments

hex

character vector of hex-colors

method

character method to use for distance calculation, passed to farver::compare_color(). One of: "euclidean", "cie1976", "cie94", "cie2000", or "cmc".

Value

numeric

Examples

pev_fcont("Viridis")(seq(0, 1, by = 0.025)) %>% pev_hex_derivative()
#> [1] 139.44806 126.50066 121.09807 125.76368 128.39942 125.92805 128.37145 #> [8] 129.86009 126.42235 125.93043 124.39282 118.50278 95.39470 86.44091 #> [15] 89.68236 98.16341 111.65121 117.85282 123.58192 131.61543 141.54127 #> [22] 135.78138 134.11591 147.46890 147.61106 126.19074 125.16032 129.98156 #> [29] 128.78150 124.58214 130.59543 159.31153 171.00922 166.81506 152.49545 #> [36] 137.00919 121.24842 113.08599 104.25259 70.75733 38.69577