function convertToRGB($start_color) {
$R = (int)($start_color / 65536);
$remainder1 = $start_color - $R * 65536;
$G = (int)($remainder1 / 256);
$B = $remainder1 - $G * 256;
return [$R, $G, $B];
}
// 示例使用
$color = 16777215;
list($R, $G, $B) = convertToRGB($color);
echo "RGB分量为: R = $R, G = $G, B = $B";
11-10
272