+(defun munsell-hue-round (h &optional round-function)
+ (unless round-function (setq round-function 'round))
+ (let ((h2 (* 5 (apply round-function (car h) '(2.5)))))
+ (if (= h2 0)
+ (concat
+ "10"
+ (cadr
+ (member
+ (cdr h) '("R" "RP" "P" "PB" "B" "BG" "G" "GY" "Y" "YR" "R"))))
+ (concat
+ (int-to-string (ash h2 -1))
+ (unless (= (logand h2 1) 0) ".5")
+ (cdr h)))))
+
+(defun munsell-value-round (v &optional round-function)
+ (unless round-function (setq round-function 'round))
+ (if (<= v 0.9)
+ (let ((rounded (apply round-function v '(0.2))))
+ (if (= rounded 5)
+ "1"
+ (concat "0." (int-to-string (* 2 rounded)))))
+ (int-to-string (apply round-function v '(1)))))
+
+(defun munsell-chroma-round (c &optional round-function)
+ (unless round-function (setq round-function 'round))
+ (int-to-string (* 2 (apply chroma-round c '(2)))))
+