Skip to content

Commit

Permalink
all clear
Browse files Browse the repository at this point in the history
  • Loading branch information
iamh2o committed Aug 18, 2021
1 parent c0ffdc7 commit 0f59b0b
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 10 deletions.
1 change: 0 additions & 1 deletion bin/print_colored_txt.py
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@


print_colors(
RGB(222, 222, 222),
print_chars=args.text,
foreground_color=color_t,
background_color=color_b,
Expand Down
4 changes: 2 additions & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[metadata]
name = rgbw_colorspace_converter
version = "0.1.2"
version = "0.1.3"
author = John Major
author_email = iamh2o@gmail.com
description = Generate RGBW values for RGB, HSV, HSL, HEX, HSI values, and move between them all.
Expand All @@ -25,4 +25,4 @@ install_requires =
html2image
ansi2html
[options.packages.find]
where = src
where = src
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

setuptools.setup(
name="rgbw_colorspace_converter",
version="0.1.2",
version="0.1.3",
author="John Major",
author_email="iamh2o@gmail.com",
description="Convert between RGB / HSV / HSL / HSI / HEX Color Spaces. And, emit the RGBW code for each.",
Expand All @@ -26,6 +26,7 @@
"bin/run_color_module_RGB_HSV_HEX_demo.py",
"bin/run_spectrum_saturation_cycler.py",
"bin/path_between_2_colors.py",
"bin/print_colored_txt.py",
],
python_requires=">=3.7",
install_requires=["colr", "docopt", "html2image", "ansi2html"],
Expand Down
14 changes: 8 additions & 6 deletions src/rgbw_colorspace_converter/tools/color_printer.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

# Write colors module using colr!
def print_colors(
color=RGB(255, 255, 9),
color=None,
print_chars="_",
ansi_bat_f=None,
ansi_html_f=None,
Expand All @@ -32,23 +32,25 @@ def print_colors(
raise Exception(
"\t\t\t\n\n\t\t\tYou must specify color UNLESS you specify both background_color and foreground_color independently."
)
if background_color is None:
background_color = color

if foreground_color is None:
foreground_color = color
if background_color is None:
if print_bars:
background_color = color
else:
background_color = RGB(1, 1, 1)

no_newlines_flag = ""
if no_newlines:
no_newlines_flag = " -n "

if check_term_size:
col_width = os.get_terminal_size().columns - 2

ret_code = None
blk = RGB(1, 1, 1)

if print_bars is False:
background_color = RGB(1, 1, 1)

cap_o = ""
if capture_output is True:
cap_o = f" | tee -a {ansi_bat_f} "
Expand Down

0 comments on commit 0f59b0b

Please sign in to comment.