![]() Holiday Red and Gold 6 CXCF1931 CXAD132D CXD9991A CXEAA61E CXF2BC13 CX216A1B * Palette Name |n| color1 | color2 | color2 | color4 |. ID + 1 /* assign a unique ID to each color */ end Ĭall symput ( 'AllColors', palette ) /* concatenate colors store in macro */ drop n col palette Input color = inputn ( substr (color, 3, 2 ), "HEX2." ) /* get RGB colors from hex */ Length palette $450 /* must be big enough to hold all colors */ retain ID 1 palette As explained in the previous article, the DATA step also creates an ID value for each color and creates a macro variable (AllColors) that contains the list of all colors. informat to convert the hexadecimal values to their equivalent RGB values. ![]() The following DATA step reads the colors in the Christmas palettes and uses the HEX2. The colors in SAS are 8-bit colors, which means that each coordinate in RGB space has a value between 0 and 255. I thought it would be fun to use principal component analysis to compute and visualize the linear subspace that best captures the set of Christmas colors!Įach color can be represented as an ordered triplet of unsigned integers in RGB space. Rather, they represent a specific subset of Christmas colors. ![]() Clearly, the colors in the Christmas palettes are not a random sample from the space of RGB colors. You can see that the palettes include many red, green, and golden colors. In a previous article, I visualized seven Christmas-themed palettes of colors, as shown to the right.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |