Permalink
Browse files

[zsh] rgb2xterm no more

  • Loading branch information...
1 parent 382e415 commit 75105510438ff272307929d701dfbe0cd32340c6 @sickill committed Jan 6, 2013
Showing with 0 additions and 17 deletions.
  1. +0 −17 .zsh/rgb2xterm.rb
View
@@ -1,17 +0,0 @@
-#!/usr/bin/env ruby
-
-def c(r,g,b)
- 16 + (6 * (r / 256.0)).to_i * 36 + (6 * (g / 256.0)).to_i * 6 + (6 * (b / 256.0)).to_i
-end
-
-def chex(color)
- r = color[0..1].to_i(16)
- g = color[2..3].to_i(16)
- b = color[4..5].to_i(16)
- c(r, g, b)
-end
-
-if ARGV.size > 0
- puts chex(ARGV[0].gsub("#", "").downcase)
-end
-

0 comments on commit 7510551

Please sign in to comment.