Skip to main content
Ctrl+K

laudanum

  • GitHub
  • PyPI
  • GitHub
  • PyPI
  • laudanum.logo

laudanum.logo#

For creating a logo.

Classes

Logo

Creates a logo using ASCII art.

LogoParams

Stores default values for the Logo object.

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.

See also

laudanum.exceptions.InvalidRGBAError
laudanum.exceptions.InvalidFontError

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()
create()[source]#

Creates the ASCII logo.

Raises:
InvalidRGBAError

Raised when you provide an illegal RGBA value.

InvalidFontError

Raised when you provide a font that cannot be found in art’s gallery.

On this page
  • Logo
    • Logo.create

This Page

  • Show Source

© Copyright 2025, Mike Letts.

Created using Sphinx 7.4.7.

Built with the PyData Sphinx Theme 0.16.1.