Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Detect duplicate colours #4183

Merged
merged 2 commits into from
Jul 6, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions lib/linguist/languages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1588,7 +1588,7 @@ Gherkin:
language_id: 76
Glyph:
type: programming
color: "#e4cc98"
color: "#c1ac7f"
extensions:
- ".glf"
tm_scope: source.tcl
Expand Down Expand Up @@ -2252,7 +2252,7 @@ Jupyter Notebook:
language_id: 185
KRL:
type: programming
color: "#28431f"
color: "#28430A"
extensions:
- ".krl"
tm_scope: none
Expand Down Expand Up @@ -3971,7 +3971,7 @@ RenderScript:
language_id: 323
Ring:
type: programming
color: "#0e60e3"
color: "#2D54CB"
extensions:
- ".ring"
tm_scope: source.ring
Expand Down Expand Up @@ -4867,7 +4867,7 @@ UrWeb:
language_id: 383
VCL:
type: programming
color: "#0298c3"
color: "#148AA8"
extensions:
- ".vcl"
tm_scope: source.varnish.vcl
Expand Down
2 changes: 1 addition & 1 deletion test/test_color_proximity.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def test_color_proximity
cp = ColorProximity.new(0.05, langs_with_colors.map { |lang| cut_hash(lang.color) })
failing_threshold = langs_with_colors.map do |lang|
state = cp.past_threshold?(cut_hash(lang.color))
if !state.first && lang.color != "##{state.last.first}"
if !state.first && lang.color != "##{state.last.first}" || state.last.uniq.length != state.last.length
"- #{lang} (#{lang.color}) is too close to #{state.last}"
end
end.compact
Expand Down