diff options
author | Hamilton Kibbe <hamilton.kibbe@gmail.com> | 2015-12-20 23:54:20 -0500 |
---|---|---|
committer | Hamilton Kibbe <hamilton.kibbe@gmail.com> | 2015-12-20 23:54:20 -0500 |
commit | af5541ac93b222c05229ee05c9def8dbae5f6e25 (patch) | |
tree | 947d56c540c66e589dff563ccb367c47547dfdad /gerber/render/theme.py | |
parent | d1598b46c91ee36719460d49d7ba2ed5ecd0ef45 (diff) | |
download | gerbonara-af5541ac93b222c05229ee05c9def8dbae5f6e25.tar.gz gerbonara-af5541ac93b222c05229ee05c9def8dbae5f6e25.tar.bz2 gerbonara-af5541ac93b222c05229ee05c9def8dbae5f6e25.zip |
Allow renderer to write to memory per #38
Some updates to rendering colors/themes
Diffstat (limited to 'gerber/render/theme.py')
-rw-r--r-- | gerber/render/theme.py | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/gerber/render/theme.py b/gerber/render/theme.py index 5d39bb6..eae3735 100644 --- a/gerber/render/theme.py +++ b/gerber/render/theme.py @@ -19,12 +19,13 @@ COLORS = { 'black': (0.0, 0.0, 0.0), 'white': (1.0, 1.0, 1.0), - 'fr-4': (0.702, 0.655, 0.192), + 'fr-4': (0.290, 0.345, 0.0), 'green soldermask': (0.0, 0.612, 0.396), 'blue soldermask': (0.059, 0.478, 0.651), 'red soldermask': (0.968, 0.169, 0.165), 'black soldermask': (0.298, 0.275, 0.282), - 'enig copper': (0.780, 0.588, 0.286), + 'purple soldermask': (0.2, 0.0, 0.334), + 'enig copper': (0.686, 0.525, 0.510), 'hasl copper': (0.871, 0.851, 0.839) } @@ -40,11 +41,19 @@ class Theme(object): def __init__(self, **kwargs): self.background = kwargs.get('background', RenderSettings(COLORS['black'], 0.0)) self.topsilk = kwargs.get('topsilk', RenderSettings(COLORS['white'])) - self.topsilk = kwargs.get('bottomsilk', RenderSettings(COLORS['white'])) - self.topmask = kwargs.get('topmask', RenderSettings(COLORS['green soldermask'], 0.8, True)) + self.bottomsilk = kwargs.get('bottomsilk', RenderSettings(COLORS['white'])) self.topmask = kwargs.get('topmask', RenderSettings(COLORS['green soldermask'], 0.8, True)) + self.bottommask = kwargs.get('bottommask', RenderSettings(COLORS['green soldermask'], 0.8, True)) self.top = kwargs.get('top', RenderSettings(COLORS['hasl copper'])) self.bottom = kwargs.get('top', RenderSettings(COLORS['hasl copper'])) self.drill = kwargs.get('drill', self.background) +THEMES = { + 'Default': Theme(), + 'Osh Park': Theme(top=COLORS['enig copper'], + bottom=COLORS['enig copper'], + topmask=COLORS['purple soldermask'], + bottommask=COLORS['purple soldermask']), +} + |