laudanum.logo#
For creating a logo.
Classes
- class Logo[source]#
Creates a logo using ASCII art.
Attributes
text
(str) The text to add into your logo.
font
(str, optional) The ASCII font that you want to use in your logo. Default is ‘alpha’.
font_size
(int, optional) The size of the text characters that assemble the ASCII image for your logo. Default is 20.
font_path
(str, optional) The path to the font file for the text characters that assemble the ASCII image for your logo.
font_color
(tuple, optional) RGBA value for the text characters that assemble the ASCII image for your logo. Default is (255, 0, 0, 255)
background_color
(tuple, optional) RGBA value for the background color of your logo. Default is (0, 0, 0, 0)
filename
(str, optional) The location where you want your logo saved. Default matches the text parameter plus the
.png
extension.Methods
create()
Creates the logo.
Notes
Only PNG images are permitted in order to support the creation of images with transparent backgrounds via RGBA values. The size of images is relative to the size of the rendered ASCII art and cannot be controlled. Every font in the art font gallery is available. The default character font file can be found in the fonts/ submodule of this package.
Examples
>>> logo = Logo('howdy') >>> logo.create()