A Python wrapper for the CoolText.com image generation API.
Build typed payloads, post to CoolText's /PostChange endpoint, and get back a
rendered image URL β all in a few lines of code.
pip install pycooltext-api -Ufrom cooltext import CoolText, PostChangeConfigOptions
config = PostChangeConfigOptions(LogoID="732440996", Text="Hello World")
result = CoolText(config).create()
print(result) # prints the image URL
result.download() # saves the image locallyBrowse all logos at https://thehritu.github.io/CoolText/. Here are a few examples:
| Logo ID | Preview |
|---|---|
4618063429 |
![]() |
8 |
![]() |
2975689126 |
![]() |
829964308 |
![]() |
732453157 |
![]() |
1779834160 |
![]() |
...and many more on the logo id list.
PostChangeConfigOptions accepts these fields:
| Field | Type | Default | Description |
|---|---|---|---|
LogoID |
str |
required | ID of the CoolText logo style |
Text |
str |
"Cool Text" |
Text to render |
FontSize |
str |
"70" |
Font size |
FileFormat |
str |
"6" |
Output format ( See table below ) |
BackgroundColor_color |
str |
"FFFFFF" |
Background colour (hex) |
Color1_color |
str |
None |
Primary text colour |
Color2_color |
str |
None |
Secondary colour |
Boolean1βBoolean3 |
str |
None |
Logo-specific toggles |
Integer1βInteger14_color |
str |
None |
Logo-specific numeric options |
FileFormat accepts these values:
| Value | Format |
|---|---|
1 |
GIF with background color (if BackgroundColor_color is provided) |
2 |
GIF (Transparent) |
3 |
GIF (Transparent With No Dither) |
4 |
JPG with background color (if BackgroundColor_color is provided) |
5 |
PNG with background color (if BackgroundColor_color is provided) |
6 |
PNG (Transparent) (Default) |
Returns a dictionary of all default values for the given logo id
from cooltext import CoolText, PostChangeConfigOptions
config = PostChangeConfigOptions(LogoID="2975689126")
defaults = CoolText(config).get_defaults()
print(defaults)CoolText.create() returns a CoolTextResult object:
result = CoolText(config).create()
str(result) # the image URL as a string
bool(result) # False if the request failed
result.download() # save to current directory
result.download("out.png") # save to a specific path
result.download("out.png", stream=False) # disable streamingIf anything fails, create() returns a falsy CoolTextResult and logs the error.
Search for logos on cooltext.com by keyword:
from cooltext import CoolTextSearch
results = CoolTextSearch().search("gold") # list of CoolTextSearchResult
for result in results:
print(result.title, " - ", result.link)
print(result.to_dict()) # get title and link as a dictionaryCoolTextSearch.search() returns a list of CoolTextSearchResult objects.
CoolTextSearchResult has these attributes:
title: The logo's title (e.g. "Gold Text")link: The URL to the logo's page on CoolText.com
CoolTextSearchResult has these methods:
to_dict(): Returns a dictionary with the title and link
from cooltext.modules import CoolTextSearchResult
result = CoolTextSearchResult("Gold Text", "https://cooltext.com/Logo-ID/1234567890")
print(result.title) # "Gold Text"
print(result.link) # "https://cooltext.com/Logo-ID/1234567890"
print(result.to_dict()) # {"title": "Gold Text", "link": "https://cooltext.com/Logo-ID/1234567890"}First, install the extra dependency:
pip install richNo arguments β launches an interactive prompt:
cooltextQuick create β just pass your text directly:
cooltext "Hello World"Pick a specific logo:
cooltext "Hello World" --logo 732453157Save the image to a file:
cooltext "Hello World" --save output.pngPlain output (just the URL, no colors β useful for scripting):
cooltext "Hello World" --as-textFind logo styles by keyword:
cooltext search fire
cooltext search "neon" --limit 1Add
--as-textto get plain line-by-line output instead of a table.
On some operating systems, the CLI may not be available as cooltext immediately after installation. If you encounter a "command not found" error, try running it with Python:
python -m cooltext "Hello World"Browse all available logos at https://thehritu.github.io/CoolText and copy the ID from the URL.
Contributions are welcome β open an issue or submit a pull request.
MIT Β© TheHritu






