![]() The colors are shown in the table below and the full code is shown below that. Stores these constants in an OrderedDict.In the HSV/HSB scale, Pure White has a hue of 359°, 0 saturation and a brightness value of 100. The CMYK color codes, used in printers, are C:0 M:0 Y:0 K:0. ![]() In the HSV/HSB scale, Solid White has a hue of 210°, 1 saturation and a brightness value of 100. The CMYK color codes, used in printers, are C:1 M:0 Y:0 K:0. Return '#'.format(self.red,een,self.blue) The equivalent RGB values are (255, 255, 255), which means it is composed of 33 red, 33 green and 33 blue. The equivalent RGB values are (253, 254, 255), which means it is composed of 33 red, 33 green and 33 blue. Extends the Color class to include a method for getting the hex formatted color:.Contains constants for 551 named colors* (e.g, as named tuples:Ĭolor = namedtuple('RGB','red, green, blue').I couldn’t find anything like this, so I created a color_constants module that: RGB (255, 255, 255) HEX ffffff CMYK (0, 0, 0, 0) HSL (0°, 0, 100) HWB (0°, 100, 0) Attributes: desaturated. Python Color Constants Module See Python: Tips and Tricks for similar articles.įor Pygame and other graphics work, it’s helpful to have color constants that hold the color RGB values.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |