(color: Color)
| 38 | Math.max(0, Math.min(255, Math.round(channel * 255))); |
| 39 | |
| 40 | export const colorToHex = (color: Color): string => |
| 41 | rgbToHex( |
| 42 | channelToByte(color.red), |
| 43 | channelToByte(color.green), |
| 44 | channelToByte(color.blue) |
| 45 | ); |
| 46 | |
| 47 | export const colorToRgbString = (color: Color): string => |
| 48 | [color.red, color.green, color.blue].map(channelToByte).join(" "); |
no test coverage detected