Skip to content

Commit

Permalink
CHANGE: Removed ANSI related functions from colors mezzanine file
Browse files Browse the repository at this point in the history
  • Loading branch information
Oldes committed Mar 5, 2021
1 parent 6fc8bd6 commit 1e71aa3
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 16 deletions.
17 changes: 17 additions & 0 deletions src/mezz/mezz-ansi.reb
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
Rebol [
Title: "ANSI escape sequences support"
File: %mezz-ansi.reb
Version: 1.0.0
Date: 4-Mar-2021
Purpose: "Decorate any value with bright ANSI color sequences"
]

;- using 2x append to avoid making a reduced block for the output
as-gray: func[value][append append copy "^[[1;30m" value "^[[0m"]
as-red: func[value][append append copy "^[[1;31m" value "^[[0m"]
as-green: func[value][append append copy "^[[1;32m" value "^[[0m"]
as-yellow: func[value][append append copy "^[[1;33m" value "^[[0m"]
as-blue: func[value][append append copy "^[[1;34m" value "^[[0m"]
as-purple: func[value][append append copy "^[[1;35m" value "^[[0m"]
as-cyan: func[value][append append copy "^[[1;36m" value "^[[0m"]
as-white: func[value][append append copy "^[[1;37m" value "^[[0m"]
16 changes: 0 additions & 16 deletions src/mezz/mezz-colors.reb
Original file line number Diff line number Diff line change
Expand Up @@ -61,19 +61,3 @@ mint: 100.136.116

reblue: 38.58.108
base-color: 200.200.200

import module [
name: as-colors
version: 1.0.0
purpose: "Decorate any value with bright ANSI color sequences"
][
;- using 2x append to avoid making a reduced block for the output
export as-gray: func[value][append append copy "^[[1;30m" value "^[[0m"]
export as-red: func[value][append append copy "^[[1;31m" value "^[[0m"]
export as-green: func[value][append append copy "^[[1;32m" value "^[[0m"]
export as-yellow: func[value][append append copy "^[[1;33m" value "^[[0m"]
export as-blue: func[value][append append copy "^[[1;34m" value "^[[0m"]
export as-purple: func[value][append append copy "^[[1;35m" value "^[[0m"]
export as-cyan: func[value][append append copy "^[[1;36m" value "^[[0m"]
export as-white: func[value][append append copy "^[[1;37m" value "^[[0m"]
]

0 comments on commit 1e71aa3

Please sign in to comment.