Skip to content

Instantly share code, notes, and snippets.

@kiranparajuli589
Created December 8, 2022 14:47
Show Gist options
  • Save kiranparajuli589/788087d8b0c6bd64189a820d5ffb0181 to your computer and use it in GitHub Desktop.
Save kiranparajuli589/788087d8b0c6bd64189a820d5ffb0181 to your computer and use it in GitHub Desktop.
Print colorful plus bold with (in) Makefile
FONT_RED := $(shell tput setaf 1)
FONT_GREEN := $(shell tput setaf 2)
FONT_YELLOW := $(shell tput setaf 3)
FONT_BLUE := $(shell tput setaf 4)
FONT_PURPLE := $(shell tput setaf 5)
FONT_CYAN := $(shell tput setaf 6)
FONT_GRAY := $(shell tput setaf 7)
FONT_BLACK := $(shell tput setaf 8)
FONT_BOLD := $(shell tput bold)
FONT_RESET := $(shell tput sgr0)
print-test:
@printf "$(FONT_RED)red$(FONT_RESET)\n"
@printf "$(FONT_GREEN)green$(FONT_RESET)\n"
@printf "$(FONT_YELLOW)yellow$(FONT_RESET)\n"
@printf "$(FONT_BLUE)blue$(FONT_RESET)\n"
@printf "$(FONT_PURPLE)purple$(FONT_RESET)\n"
@printf "$(FONT_CYAN)cyan$(FONT_RESET)\n"
@printf "$(FONT_GRAY)gray$(FONT_RESET)\n"
@printf "$(FONT_BLACK)black$(FONT_RESET)\n"
@printf "$(FONT_BOLD)bold$(FONT_RESET)\n"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment