Skip to content

Instantly share code, notes, and snippets.

@MrHuxu
Last active September 16, 2025 22:32
Show Gist options
  • Select an option

  • Save MrHuxu/0e4af45006016ee6692022837b586714 to your computer and use it in GitHub Desktop.

Select an option

Save MrHuxu/0e4af45006016ee6692022837b586714 to your computer and use it in GitHub Desktop.
Makefile font bold & colored
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