color_scheme
color_scheme
¶
ColorScheme class - utility for describing color schemes.
ColorScheme
¶
Bases: FrozenGeneralModel
Set of colors which should be used for rendering.
ColorScheme class contains set of colors which should be used for different parts of rendered image. At the same time it also works as a container for predefined color schemes commonly used for parts of PCB.
Predefined colors
All predefined colors have two variants - normal one and one with "*_ALPHA" suffix. Those without suffix have solid background and are not intended for constructing multi-layer images out of them ie. they are not suitable for rendering a project consisting of separate copper, silk, pase mask and composing them into single image. For cases when rendered images are intended for stacking "*_ALPHA" schemes should be used, as background and transparent parts of image will be truly transparent.
Source code in src/pygerber/backend/rasterized_2d/color_scheme.py
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 |
|
SILK
class-attribute
¶
Default color of silk layer.
This schema provided non-transparent background, which results in images which can not be used for stacking on top of other layers, as they would completely obscure them.
SILK_ALPHA
class-attribute
¶
Default color of silk layer with alpha channel.
This schema provides transparent background. Images using this schema can be stacked on top of each other without obscuring layers below.
COPPER
class-attribute
¶
Default color of copper layer.
This schema provided non-transparent background, which results in images which can not be used for stacking on top of other layers, as they would completely obscure them.
COPPER_ALPHA
class-attribute
¶
Default color of copper layer with alpha channel.
This schema provides transparent background. Images using this schema can be stacked on top of each other without obscuring layers below.
PASTE_MASK
class-attribute
¶
Default color of paste mask layer.
This schema provided non-transparent background, which results in images which can not be used for stacking on top of other layers, as they would completely obscure them.
PASTE_MASK_ALPHA
class-attribute
¶
Default color of paste mask layer with alpha channel.
This schema provides transparent background. Images using this schema can be stacked on top of each other without obscuring layers below.
SOLDER_MASK
class-attribute
¶
Default color of solder mask layer.
This schema provided non-transparent background, which results in images which can not be used for stacking on top of other layers, as they would completely obscure them.
SOLDER_MASK_ALPHA
class-attribute
¶
Default color of solder mask layer with alpha channel.
This schema provides transparent background. Images using this schema can be stacked on top of each other without obscuring layers below.
DEFAULT_GRAYSCALE
class-attribute
¶
Default color scheme for files which were not assigned other color scheme.
debug_1_color
class-attribute
instance-attribute
¶
Color used for debug elements.
debug_2_color
class-attribute
instance-attribute
¶
Color used for debug elements.
get_grayscale_to_rgba_color_map
¶
Return grayscale to RGBA color map.