def hsv2rgb_raw(hsv):
HSV_SECTION_3 = <NUM_LIT><EOL>h, s, v = hsv<EOL>invsat = <NUM_LIT:255> - s<EOL>brightness_floor = (v * invsat) // <NUM_LIT><EOL>color_amplitude = v - brightness_floor<EOL>section = h // HSV_SECTION_3  <EOL>offset = h % HSV_SECTION_3  <EOL>rampup = offset<EOL>rampdown = (HSV_SECTION_3 - <NUM_LIT:1>) - offset<EOL>rampup_amp_adj = (rampup * color_amplitude) // (<NUM_LIT> // <NUM_LIT:4>)<EOL>rampdown_amp_adj = (rampdown * color_amplitude) // (<NUM_LIT> // <NUM_LIT:4>)<EOL>rampup_adj_with_floor = rampup_amp_adj + brightness_floor<EOL>rampdown_adj_with_floor = rampdown_amp_adj + brightness_floor<EOL>r, g, b = (<NUM_LIT:0>, <NUM_LIT:0>, <NUM_LIT:0>)<EOL>if section:<EOL><INDENT>if section == <NUM_LIT:1>:<EOL><INDENT>r = brightness_floor<EOL>g = rampdown_adj_with_floor<EOL>b = rampup_adj_with_floor<EOL><DEDENT>else:<EOL><INDENT>r = rampup_adj_with_floor<EOL>g = brightness_floor<EOL>b = rampdown_adj_with_floor<EOL><DEDENT><DEDENT>else:<EOL><INDENT>r = rampdown_adj_with_floor<EOL>g = rampup_adj_with_floor<EOL>b = brightness_floor<EOL><DEDENT>return (r, g, b)<EOL>
Converts an HSV tuple to RGB. Intended for internal use.
You should use hsv2rgb_spectrum or hsv2rgb_rainbow instead.