MCPcopy Create free account
hub / github.com/PageBot/PageBot / getFlatRGB

Method getFlatRGB

Lib/pagebot/contexts/flatcontext/flatcontext.py:1005–1011  ·  view source on GitHub ↗

Answers the color tuple that is valid for self.fileType, otherwise Flat gives an error. TODO: Make better match for all file types, transparency and spot color.

(self, c)

Source from the content-addressed store, hash-verified

1003 # D R A W I N G
1004
1005 def getFlatRGB(self, c):
1006 """Answers the color tuple that is valid for self.fileType, otherwise
1007 Flat gives an error.
1008
1009 TODO: Make better match for all file types, transparency and spot
1010 color."""
1011 return self.b.rgb(*to255(c.rgb))
1012
1013 def _getShape(self):
1014 """Renders Pagebot FlatBuilder shape to a Flat shape."""

Callers 1

_getShapeMethod · 0.95

Calls 1

to255Function · 0.90

Tested by

no test coverage detected