Skip to content

Commit c65c4d0

Browse files
author
repo-visualizer
committed
use GitHub file colors from github/linguist
fixes #4
1 parent fd3e0c8 commit c65c4d0

File tree

2 files changed

+1055
-24
lines changed

2 files changed

+1055
-24
lines changed

src/Tree.tsx

Lines changed: 2 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ import maxBy from "lodash/maxBy";
1515
import entries from "lodash/entries";
1616
import uniqBy from "lodash/uniqBy";
1717
import flatten from "lodash/flatten";
18+
// file colors are from the github/linguist repo
19+
import fileColors from "./language-colors.json";
1820
import { CircleText } from "./CircleText";
1921
import {
2022
keepBetween,
@@ -44,30 +46,6 @@ type ProcessedDataItem = {
4446
parent: ProcessedDataItem | null;
4547
children: Array<ProcessedDataItem>;
4648
};
47-
const fileColors = {
48-
ts: "#29CBBA",
49-
tsx: "#12B9B1",
50-
js: "#CE83F1",
51-
jsx: "#C56BF0",
52-
md: "#6473F2",
53-
json: "#FDA7DF",
54-
csv: "#D980FA",
55-
svg: "#FFC312",
56-
css: "#C3E438",
57-
svelte: "#B53471",
58-
scss: "#9980FA",
59-
html: "#C7ECEE",
60-
png: "#45aaf2",
61-
jpg: "#3dc1d3",
62-
go: "#E67E23",
63-
rb: "#eb4d4b",
64-
php: "#e28f56",
65-
sh: "#badc58",
66-
m: "#FFD428",
67-
py: "#5758BB",
68-
mp4: "#788BA3",
69-
webm: "#4B6584",
70-
};
7149
const colorThemes = ["file", "changes", "last-change"];
7250
const colorTheme = "file";
7351
const looseFilesId = "__structure_loose_file__";

0 commit comments

Comments
 (0)