Module: Termin::ANSIColor::RGBColorMetrics::NTSC
- Defined in:
- lib/termin/ansicolor/rgb_color_metrics.rb
Overview
Implements color distance the best way everybody knows…
Class Method Summary collapse
Class Method Details
.distance(rgb1, rgb2) ⇒ Object
60 61 62 |
# File 'lib/termin/ansicolor/rgb_color_metrics.rb', line 60 def self.distance(rgb1, rgb2) rgb1.weighted_euclidean_distance_to rgb2, [ 0.299, 0.587, 0.114 ] end |