# 引入
import { rgb2hsv, hsv2rgb } from 't-comm';
// or
import { rgb2hsv, hsv2rgb} from 't-comm/lib/color/index';
# rgb2hsv()
描述:
Converts an RGB color value to HSV Assumes: r, g, and b are contained in the set [0, 255] or [0, 1]. Returns: { h, s, v } in [0,1]
参数:
# hsv2rgb()
描述:
Converts an HSV color value to RGB. Assumes: h is contained in [0, 1] or [0, 360] and s and v are contained in [0, 1] or [0, 100]. Returns: { r, g, b } in the set [0, 255]
参数: