CMYK components to GRB value.
(c:float, m:float, y:float, k:float, cmyk_scale:float=100)
| 171 | |
| 172 | |
| 173 | def cmyk_to_rgb(c:float, m:float, y:float, k:float, cmyk_scale:float=100): |
| 174 | '''CMYK components to GRB value.''' |
| 175 | r = (1.0 - c / float(cmyk_scale)) * (1.0 - k / float(cmyk_scale)) |
| 176 | g = (1.0 - m / float(cmyk_scale)) * (1.0 - k / float(cmyk_scale)) |
| 177 | b = (1.0 - y / float(cmyk_scale)) * (1.0 - k / float(cmyk_scale)) |
| 178 | res = rgb_to_value([r, g, b]) # type: int |
| 179 | return res |
| 180 | |
| 181 | |
| 182 | def rgb_value(components:list): |
no test coverage detected
searching dependent graphs…