colors – Predefined color values¶
Predefined “standard colors” and helper functions.
Colors are defined as (RED, GREEN, BLUE) tuples. Feel free to define your own!
-
codex.colors.BLACK= (0, 0, 0)¶
-
codex.colors.BLUE= (0, 0, 255)¶
-
codex.colors.BROWN= (111, 78, 55)¶
-
codex.colors.COLORS_BY_NAME= {'BLACK': (0, 0, 0), 'BLUE': (0, 0, 255), 'BROWN': (111, 78, 55), 'CYAN': (0, 255, 255), 'DARK_BLUE': (0, 0, 139), 'DARK_GREEN': (34, 139, 34), 'GRAY': (96, 96, 96), 'GREEN': (0, 255, 0), 'LIGHT_GRAY': (211, 211, 211), 'MAGENTA': (255, 0, 255), 'ORANGE': (255, 165, 0), 'PINK': (255, 20, 147), 'PURPLE': (106, 13, 173), 'RED': (255, 0, 0), 'TRANSPARENT': (247, 251, 247), 'WHITE': (255, 255, 255), 'YELLOW': (255, 255, 0)}¶
-
codex.colors.COLOR_LIST= ((0, 0, 0), (111, 78, 55), (255, 0, 0), (255, 165, 0), (255, 255, 0), (0, 255, 0), (0, 0, 255), (106, 13, 173), (96, 96, 96), (255, 255, 255), (0, 255, 255), (255, 0, 255), (255, 20, 147), (211, 211, 211), (34, 139, 34), (0, 0, 139))¶
-
codex.colors.CYAN= (0, 255, 255)¶
-
codex.colors.DARK_BLUE= (0, 0, 139)¶
-
codex.colors.DARK_GREEN= (34, 139, 34)¶
-
codex.colors.GRAY= (96, 96, 96)¶
-
codex.colors.GREEN= (0, 255, 0)¶
-
codex.colors.LIGHT_GRAY= (211, 211, 211)¶
-
codex.colors.MAGENTA= (255, 0, 255)¶
-
codex.colors.ORANGE= (255, 165, 0)¶
-
codex.colors.PINK= (255, 20, 147)¶
-
codex.colors.PURPLE= (106, 13, 173)¶
-
codex.colors.RED= (255, 0, 0)¶
-
codex.colors.TRANSPARENT= (247, 251, 247)¶
-
codex.colors.WHITE= (255, 255, 255)¶
-
codex.colors.YELLOW= (255, 255, 0)¶
-
codex.colors.color16(color24)[source]¶ Convert a 24-bit RGB tuple to a 16-bit native LCD color tuple.
-
codex.colors.scale_rgb(val, pcnt=100)[source]¶ Scale RGB tuple elements by given percentage (bright/dim)