From c501c4e6a419c2b0020101ccc9d8a449390ea671 Mon Sep 17 00:00:00 2001
From: Chidambaram Nachiappan
<60850111+thechidambaram@users.noreply.github.com>
Date: Wed, 23 Feb 2022 21:42:19 +0000
Subject: Generate svg preview instead of png
---
make_preview_image.lua | 32 +++++++++++---------------------
1 file changed, 11 insertions(+), 21 deletions(-)
diff --git a/make_preview_image.lua b/make_preview_image.lua
index 31f088d..bf0d4ee 100755
--- a/make_preview_image.lua
+++ b/make_preview_image.lua
@@ -32,30 +32,20 @@ for i = #colors, 1, -1 do
end
--- generate ppm file
+--generate svg file
local w = 200
local h = 16
-local fp = io.open(name .. ".ppm", "wb")
-fp:write("P3\n")
-fp:write(w, " ", h, "\n")
-fp:write("255\n")
-
-local row = {}
-for i = 0, w - 1 do
- local idx = math.floor((#colors / w) * i) + 1
- local r, g, b = table.unpack(colors[idx])
- table.insert(row, r)
- table.insert(row, g)
- table.insert(row, b)
-end
-row = table.concat(row, " ") .. "\n"
+local fp = io.open(name .. ".svg", "wb")
+
+fp:write('')
+fp:close()
--- convert ppm file to png
-os.execute(string.format("convert %s.ppm %s.png", name, name))
-os.execute(string.format("rm %s.ppm", name))
--
cgit v1.2.3
From 2d6082b6640241deaa77b3d511c9aa502893a10f Mon Sep 17 00:00:00 2001
From: Chidambaram Nachiappan
<60850111+thechidambaram@users.noreply.github.com>
Date: Thu, 24 Feb 2022 18:47:34 +0000
Subject: Update all previews to SVGs
---
README.md | 44 ++++++++++++++++----------------
make_preview_image.lua | 2 +-
previews/abyss_preview.svg | 16 ++++++++++++
previews/c0mfy_preview.svg | 17 ++++++++++++
previews/cold_lime_preview.svg | 12 +++++++++
previews/dracula_preview.svg | 18 +++++++++++++
previews/duorand_preview.svg | 12 +++++++++
previews/duotone_preview.svg | 14 ++++++++++
previews/github_preview.svg | 19 ++++++++++++++
previews/gruvbox_dark_preview.svg | 14 ++++++++++
previews/gruvbox_light_preview.svg | 14 ++++++++++
previews/liqube_preview.svg | 19 ++++++++++++++
previews/mariana_preview.svg | 22 ++++++++++++++++
previews/moe_preview.svg | 18 +++++++++++++
previews/monodark_preview.svg | 14 ++++++++++
previews/monokai-pro-classic_preview.svg | 19 ++++++++++++++
previews/monokai_preview.svg | 18 +++++++++++++
previews/nord_preview.svg | 18 +++++++++++++
previews/onedark_preview.svg | 21 +++++++++++++++
previews/only_dark_preview.svg | 27 ++++++++++++++++++++
previews/solarized_light_preview.svg | 15 +++++++++++
previews/solarobj_preview.svg | 20 +++++++++++++++
previews/vscode-dark_preview.svg | 21 +++++++++++++++
previews/winter_preview.svg | 17 ++++++++++++
previews/zenburn_preview.svg | 21 +++++++++++++++
25 files changed, 429 insertions(+), 23 deletions(-)
create mode 100644 previews/abyss_preview.svg
create mode 100644 previews/c0mfy_preview.svg
create mode 100644 previews/cold_lime_preview.svg
create mode 100644 previews/dracula_preview.svg
create mode 100644 previews/duorand_preview.svg
create mode 100644 previews/duotone_preview.svg
create mode 100644 previews/github_preview.svg
create mode 100644 previews/gruvbox_dark_preview.svg
create mode 100644 previews/gruvbox_light_preview.svg
create mode 100644 previews/liqube_preview.svg
create mode 100644 previews/mariana_preview.svg
create mode 100644 previews/moe_preview.svg
create mode 100644 previews/monodark_preview.svg
create mode 100644 previews/monokai-pro-classic_preview.svg
create mode 100644 previews/monokai_preview.svg
create mode 100644 previews/nord_preview.svg
create mode 100644 previews/onedark_preview.svg
create mode 100644 previews/only_dark_preview.svg
create mode 100644 previews/solarized_light_preview.svg
create mode 100644 previews/solarobj_preview.svg
create mode 100644 previews/vscode-dark_preview.svg
create mode 100644 previews/winter_preview.svg
create mode 100644 previews/zenburn_preview.svg
diff --git a/README.md b/README.md
index 16e1ff7..b6c1661 100644
--- a/README.md
+++ b/README.md
@@ -11,30 +11,30 @@ embedded in the table.*
Theme | Preview
------|-----------------------------------------
-[`cold_lime`](colors/cold_lime.lua?raw=1) | ![cold_lime_preview](https://i.imgur.com/0p3BQCB.png)
-[`c0mfy`](colors/c0mfy.lua?raw=1) | ![c0mfy_preview](https://i.imgur.com/hgJ9e75.png)
-[`dracula`](colors/dracula.lua?raw=1) | ![dracula_preview](https://user-images.githubusercontent.com/3920290/81507632-9ead7780-92f6-11ea-85e9-7cfb9ffa97ae.png)
-[`duorand`](colors/duorand.lua?raw=1) | ![duorand_preview](https://user-images.githubusercontent.com/2798487/146656427-54a2c372-bc9c-42b6-88c4-9874c85a76ea.png)
-[`duotone`](colors/duotone.lua?raw=1) | ![duotone_preview](https://i.imgur.com/ZND82Lv.png)
-[`gruvbox_dark`](colors/gruvbox_dark.lua?raw=1) | ![gruvbox_dark_preview](https://user-images.githubusercontent.com/57670615/81137677-94bdfa00-8f2d-11ea-9224-3d70a5ec3101.png)
-[`liqube`](colors/liqube.lua?raw=1) | ![liqube_preview](https://user-images.githubusercontent.com/49284552/82159394-0c751880-988e-11ea-963d-7a25497a8fee.png)
-[`mariana`](colors/mariana.lua?raw=1) | ![mariana_preview](https://i.imgur.com/wizE1ZC.png)
-[`monodark`](colors/monodark.lua?raw=1) | ![monodark_preview](https://user-images.githubusercontent.com/3920290/80304201-62353400-87ac-11ea-9b13-9ca1b9db0f99.png)
-[`monokai`](colors/monokai.lua?raw=1) | ![monokai_preview](https://i.imgur.com/ex2Tb5A.png)
-[`monokai-pro-classic`](colors/monokai-pro-classic.lua?raw=1) | ![monokai-pro-classic_preview](https://user-images.githubusercontent.com/3920290/80307643-43419c80-87c2-11ea-9f04-580d6acf6252.png)
-[`nord`](colors/nord.lua?raw=1) | ![nord_preview](https://user-images.githubusercontent.com/22625346/92419103-6baab180-f139-11ea-8638-d90db10da086.png)
-[`onedark`](colors/onedark.lua?raw=1) | ![onedark_preview](https://user-images.githubusercontent.com/1702572/147136302-d1179cf6-fafc-4da0-a33b-4041dda7f340.png)
-[`only_dark`](colors/only_dark.lua?raw=1) | ![only_dark_preview](https://user-images.githubusercontent.com/18345339/110795752-c8825280-82a9-11eb-9d90-e9f8f9c7ebb5.png)
-[`vscode-dark`](colors/vscode-dark.lua?raw=1) | ![vscode-dark_preview](https://i.imgur.com/GcSGaZc.png)
-[`winter`](colors/winter.lua?raw=1) | ![winter_preview](https://user-images.githubusercontent.com/3920290/80304194-5c3f5300-87ac-11ea-9acf-33892579093e.png)
-[`zenburn`](colors/zenburn.lua?raw=1) | ![zenburn_preview](https://i.imgur.com/XUIJwMs.png)
+[`cold_lime`](colors/cold_lime.lua?raw=1) | ![cold_lime_preview](previews/cold_lime_preview.svg)
+[`c0mfy`](colors/c0mfy.lua?raw=1) | ![c0mfy_preview](previews/c0mfy_preview.svg)
+[`dracula`](colors/dracula.lua?raw=1) | ![dracula_preview](previews/dracula_preview.svg)
+[`duorand`](colors/duorand.lua?raw=1) | ![duorand_preview](previews/duorand_preview.svg)
+[`duotone`](colors/duotone.lua?raw=1) | ![duotone_preview](previews/duotone_preview.svg)
+[`gruvbox_dark`](colors/gruvbox_dark.lua?raw=1) | ![gruvbox_dark_preview](previews/gruvbox_dark_preview.svg)
+[`liqube`](colors/liqube.lua?raw=1) | ![liqube_preview](previews/liqube_preview.svg)
+[`mariana`](colors/mariana.lua?raw=1) | ![mariana_preview](previews/mariana_preview.svg)
+[`monodark`](colors/monodark.lua?raw=1) | ![monodark_preview](previews/monodark_preview.svg)
+[`monokai`](colors/monokai.lua?raw=1) | ![monokai_preview](previews/monokai_preview.svg)
+[`monokai-pro-classic`](colors/monokai-pro-classic.lua?raw=1) | ![monokai-pro-classic_preview](previews/monokai-pro-classic_preview.svg)
+[`nord`](colors/nord.lua?raw=1) | ![nord_preview](previews/nord_preview.svg)
+[`onedark`](colors/onedark.lua?raw=1) | ![onedark_preview](previews/onedark_preview.svg)
+[`only_dark`](colors/only_dark.lua?raw=1) | ![only_dark_preview](previews/only_dark_preview.svg)
+[`vscode-dark`](colors/vscode-dark.lua?raw=1) | ![vscode-dark_preview](previews/vscode-dark_preview.svg)
+[`winter`](colors/winter.lua?raw=1) | ![winter_preview](previews/winter_preview.svg)
+[`zenburn`](colors/zenburn.lua?raw=1) | ![zenburn_preview](previews/zenburn_preview.svg)
## Light
Theme | Preview
------|-----------------------------------------
-[`github`](colors/github.lua?raw=1) | ![github_preview](https://user-images.githubusercontent.com/3920290/80308013-800e9300-87c4-11ea-88a7-1f56104a7423.png)
-[`gruvbox_light`](colors/gruvbox_light.lua?raw=1) | ![gruvbox_light_preview](https://user-images.githubusercontent.com/9512421/135279380-2d29c6b9-d45b-4cc5-87c8-e8a9d8c7a84b.png)
-[`moe`](colors/moe.lua?raw=1) | ![moe_preview](https://i.imgur.com/IGEtafP.png)
-[`solarized_light`](colors/solarized_light.lua?raw=1) | ![solarized_light_preview](https://user-images.githubusercontent.com/3920290/81503910-233fcc00-92de-11ea-9d6d-0a32212e6f02.png)
-[`solarobj`](colors/solarobj.lua?raw=1) | ![solarobj_preview](https://i.imgur.com/3EHFlx2.png)
+[`github`](colors/github.lua?raw=1) | ![github_preview](previews/github_preview.svg)
+[`gruvbox_light`](colors/gruvbox_light.lua?raw=1) | ![gruvbox_light_preview](previews/gruvbox_light_preview.svg)
+[`moe`](colors/moe.lua?raw=1) | ![moe_preview](previews/moe_preview.svg)
+[`solarized_light`](colors/solarized_light.lua?raw=1) | ![solarized_light_preview](previews/solarized_light_preview.svg)
+[`solarobj`](colors/solarobj.lua?raw=1) | ![solarobj_preview](previews/solarobj_preview.svg)
diff --git a/make_preview_image.lua b/make_preview_image.lua
index bf0d4ee..b97420a 100755
--- a/make_preview_image.lua
+++ b/make_preview_image.lua
@@ -37,7 +37,7 @@ local w = 200
local h = 16
local fp = io.open(name .. ".svg", "wb")
-fp:write('