### Home Classes Methods

### In Files

- lib/term/ansicolor/rgb_color_metrics.rb

### Namespace

- MODULE Term::ANSIColor::RGBColorMetrics::CIELab
- MODULE Term::ANSIColor::RGBColorMetrics::CIEXYZ
- MODULE Term::ANSIColor::RGBColorMetrics::CompuPhase
- MODULE Term::ANSIColor::RGBColorMetrics::Euclidean
- MODULE Term::ANSIColor::RGBColorMetrics::NTSC
- MODULE Term::ANSIColor::RGBColorMetrics::YUV

### Methods

- ::metric
- ::metric?
- ::metrics

### Files

- README.rdoc

### Class/Module Index

Quicksearch

- Term
- Term::ANSIColor
- Term::ANSIColor::Attribute
- Term::ANSIColor::PPMReader
- Term::ANSIColor::RGBColorMetrics
- Term::ANSIColor::RGBColorMetrics::CIELab
- Term::ANSIColor::RGBColorMetrics::CIELab::CIELabTriple
- Term::ANSIColor::RGBColorMetrics::CIEXYZ
- Term::ANSIColor::RGBColorMetrics::CIEXYZ::CIEXYZTriple
- Term::ANSIColor::RGBColorMetrics::CompuPhase
- Term::ANSIColor::RGBColorMetrics::Euclidean
- Term::ANSIColor::RGBColorMetrics::NTSC
- Term::ANSIColor::RGBColorMetrics::YUV
- Term::ANSIColor::RGBColorMetrics::YUV::YUVTriple
- Term::ANSIColor::RGBColorMetricsHelpers
- Term::ANSIColor::RGBColorMetricsHelpers::NormalizeRGBTriple
- Term::ANSIColor::RGBColorMetricsHelpers::WeightedEuclideanDistance
- Term::ANSIColor::RGBTriple

No matching classes.

# Term::ANSIColor::RGBColorMetrics

### Public Class Methods

metric(name) click to toggle source

    # File lib/term/ansicolor/rgb_color_metrics.rb, line 37
    def self.metric(name)
      metric?(name) or raise ArgumentError, "unknown metric #{name.inspect}"
    end

metric?(name) click to toggle source

    # File lib/term/ansicolor/rgb_color_metrics.rb, line 41
    def self.metric?(name)
      if const_defined?(name)
        const_get name
      end
    end

metrics() click to toggle source

    # File lib/term/ansicolor/rgb_color_metrics.rb, line 47
    def self.metrics
      constants.map(&:to_sym)
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.