(by ). We observe the following shape properties (Fig. 24 can help to get an intuition about them): HSV to RGB Given an HSV color with hue , saturation , and value , we can use the same strategy. First, we find chroma: Then we can, again, find a point along the bottom three faces of the RGB cube, with the same hue and chroma as our color (using the intermediate value X for the second largest component of this color): As before, when is an integer, "neighbouring" formulas would yield the same result. Finally, we can find R, G, and B by adding the same amount to each component, to match value: HSV to RGB alternative Given a color with hue , saturation , and value , first we define function : where and: And output R,G,B values (from ) are: Above alternative equivalent formulas allow shorter implementation. In above formulas the returns also fractional part of module e.g. the formula . The values of . The base shape is constructed as follows: is "triangle" for which non-negative values starts from k=0, highest point at k=2 and "ends" at k=4, then we change values bigger than one to one by , then change negative values to zero by – and we get (for ) something similar to green shape from Fig. 24 (which max value is 1 and min value is 0). The R,G,B functions of use this shape transformed in following way: modulo-shifted on (by ) (differently for R,G,B) scaled on (by ) and shifted on (by ). We observe following shape properties(Fig. 24 can help to get intuition about this): HSI to RGB Given an HSI color with hue , saturation , and intensity , we can use the same strategy, in a slightly different order: Where is the chroma. Then we can, again, find a point along the bottom three faces of the RGB cube, with the same hue and chroma as our color (using the intermediate value X for the second largest component of this color): Overlap (when is an integer) occurs because two ways to calculate the value are equivalent: or , as appropriate. Finally, we can find R, G, and B by adding the same amount to each component, to match lightness: Luma, chroma and hue to RGB Given a color with hue , chroma , and luma , we can again use