Skip to content

Commit cc67fee

Browse files
committed
Finish ANSI colors
1 parent f124ea0 commit cc67fee

File tree

8 files changed

+336
-200
lines changed

8 files changed

+336
-200
lines changed

TODO

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,4 @@
3434
* Consolidate fpb and fput into just fpb and have it automatically deal with making pastes or not
3535
* Language is set both in query string and POST body of fpb cli
3636
* Verify behavior around final end-of-lines matches across highlighters
37+
* Auto dark mode

cmd/print-styles-css/print.go

Lines changed: 57 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -56,54 +56,39 @@ func main() {
5656
}
5757
5858
/* ANSI colors */
59-
.text .chroma .fg-0 {
60-
color: %s;
61-
}
62-
.text .chroma .fg-0-faint {
63-
color: %s;
64-
}
65-
.text .chroma .fg-1 {
66-
color: %s;
67-
}
68-
.text .chroma .fg-1-faint {
69-
color: %s;
70-
}
71-
.text .chroma .fg-2 {
72-
color: %s;
73-
}
74-
.text .chroma .fg-2-faint {
75-
color: %s;
76-
}
77-
.text .chroma .fg-3 {
78-
color: %s;
79-
}
80-
.text .chroma .fg-3-faint {
81-
color: %s;
82-
}
83-
.text .chroma .fg-4 {
84-
color: %s;
85-
}
86-
.text .chroma .fg-4-faint {
87-
color: %s;
88-
}
89-
.text .chroma .fg-5 {
90-
color: %s;
91-
}
92-
.text .chroma .fg-5-faint {
93-
color: %s;
94-
}
95-
.text .chroma .fg-6 {
96-
color: %s;
97-
}
98-
.text .chroma .fg-6-faint {
99-
color: %s;
100-
}
101-
.text .chroma .fg-7 {
102-
color: %s;
103-
}
104-
.text .chroma .fg-7-faint {
105-
color: %s;
106-
}
59+
.text .chroma .fg-0 { color: %s; }
60+
.text .chroma .fg-1 { color: %s; }
61+
.text .chroma .fg-2 { color: %s; }
62+
.text .chroma .fg-3 { color: %s; }
63+
.text .chroma .fg-4 { color: %s; }
64+
.text .chroma .fg-5 { color: %s; }
65+
.text .chroma .fg-6 { color: %s; }
66+
.text .chroma .fg-7 { color: %s; }
67+
.text .chroma .fg-8 { color: %s; }
68+
.text .chroma .fg-9 { color: %s; }
69+
.text .chroma .fg-10 { color: %s; }
70+
.text .chroma .fg-11 { color: %s; }
71+
.text .chroma .fg-12 { color: %s; }
72+
.text .chroma .fg-13 { color: %s; }
73+
.text .chroma .fg-14 { color: %s; }
74+
.text .chroma .fg-15 { color: %s; }
75+
.text .chroma .bg-0 { background-color: %s; }
76+
.text .chroma .bg-1 { background-color: %s; }
77+
.text .chroma .bg-2 { background-color: %s; }
78+
.text .chroma .bg-3 { background-color: %s; }
79+
.text .chroma .bg-4 { background-color: %s; }
80+
.text .chroma .bg-5 { background-color: %s; }
81+
.text .chroma .bg-6 { background-color: %s; }
82+
.text .chroma .bg-7 { background-color: %s; }
83+
.text .chroma .bg-8 { background-color: %s; }
84+
.text .chroma .bg-9 { background-color: %s; }
85+
.text .chroma .bg-10 { background-color: %s; }
86+
.text .chroma .bg-11 { background-color: %s; }
87+
.text .chroma .bg-12 { background-color: %s; }
88+
.text .chroma .bg-13 { background-color: %s; }
89+
.text .chroma .bg-14 { background-color: %s; }
90+
.text .chroma .bg-15 { background-color: %s; }
91+
10792
}
10893
`,
10994
style.Name,
@@ -122,21 +107,37 @@ func main() {
122107
style.FluffyColors.DiffRemoveLineBackground,
123108
style.FluffyColors.DiffRemoveSelectedLineBackground,
124109
style.ANSIColors.Foreground.Black,
125-
style.ANSIColors.ForegroundFaint.Black,
126110
style.ANSIColors.Foreground.Red,
127-
style.ANSIColors.ForegroundFaint.Red,
128111
style.ANSIColors.Foreground.Green,
129-
style.ANSIColors.ForegroundFaint.Green,
130112
style.ANSIColors.Foreground.Yellow,
131-
style.ANSIColors.ForegroundFaint.Yellow,
132113
style.ANSIColors.Foreground.Blue,
133-
style.ANSIColors.ForegroundFaint.Blue,
134114
style.ANSIColors.Foreground.Magenta,
135-
style.ANSIColors.ForegroundFaint.Magenta,
136115
style.ANSIColors.Foreground.Cyan,
137-
style.ANSIColors.ForegroundFaint.Cyan,
138116
style.ANSIColors.Foreground.White,
139-
style.ANSIColors.ForegroundFaint.White,
117+
style.ANSIColors.Background.BrightBlack,
118+
style.ANSIColors.Background.BrightRed,
119+
style.ANSIColors.Background.BrightGreen,
120+
style.ANSIColors.Background.BrightYellow,
121+
style.ANSIColors.Background.BrightBlue,
122+
style.ANSIColors.Background.BrightMagenta,
123+
style.ANSIColors.Background.BrightCyan,
124+
style.ANSIColors.Background.BrightWhite,
125+
style.ANSIColors.Background.Black,
126+
style.ANSIColors.Background.Red,
127+
style.ANSIColors.Background.Green,
128+
style.ANSIColors.Background.Yellow,
129+
style.ANSIColors.Background.Blue,
130+
style.ANSIColors.Background.Magenta,
131+
style.ANSIColors.Background.Cyan,
132+
style.ANSIColors.Background.White,
133+
style.ANSIColors.Background.BrightBlack,
134+
style.ANSIColors.Background.BrightRed,
135+
style.ANSIColors.Background.BrightGreen,
136+
style.ANSIColors.Background.BrightYellow,
137+
style.ANSIColors.Background.BrightBlue,
138+
style.ANSIColors.Background.BrightMagenta,
139+
style.ANSIColors.Background.BrightCyan,
140+
style.ANSIColors.Background.BrightWhite,
140141
)
141142
}
142143
}

0 commit comments

Comments
 (0)