This repository has been archived by the owner on Jan 19, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
643c8b0
commit 4f62761
Showing
2 changed files
with
33 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
package pride | ||
|
||
import ( | ||
"fmt" | ||
) | ||
|
||
// PrintPansexualPrideFlag prints a pansexual pride flag in your terminal. | ||
func PrintPansexualPrideFlag() { | ||
_, height := windowSize() | ||
segmentHeight := height / 3 | ||
for segment := 1; segment <= 3; segment++ { | ||
line := "\n" | ||
for i := 0; i < segmentHeight-1; i++ { | ||
line += "\n" | ||
} | ||
if segment == 3 { | ||
line += "\n" | ||
} | ||
|
||
var colorCode string | ||
if segment == 1 { | ||
colorCode = "197" | ||
} | ||
if segment == 2 { | ||
colorCode = "220" | ||
} | ||
if segment == 3 { | ||
colorCode = "038" | ||
} | ||
fmt.Printf("\x1B[48;5;%sm%s\x1B[0m", colorCode, line) | ||
} | ||
} |