Class: Rainbow::Color::Indexed

### Home Classes Methods

### In Files

- lib/rainbow/color.rb

### Parent

Rainbow::Color

### Methods

- ::new
- #codes

### Class/Module Index

Quicksearch

- Rainbow
- Rainbow::Color
- Rainbow::Color::Indexed
- Rainbow::Color::Named
- Rainbow::Color::RGB
- Rainbow::Ext
- Rainbow::Ext::String
- Rainbow::Ext::String::InstanceMethods
- Rainbow::NullPresenter
- Rainbow::Presenter
- Rainbow::StringUtils
- Rainbow::Wrapper
- Sickill
- Sickill::Rainbow
- Object

No matching classes.

# Rainbow::Color::Indexed

### Attributes

num[R]

### Public Class Methods

new(ground, num) click to toggle source

    # File lib/rainbow/color.rb, line 39
    def initialize(ground, num)
      @ground = ground
      @num = num
    end

### Public Instance Methods

codes() click to toggle source

    # File lib/rainbow/color.rb, line 44
    def codes
      code = num + (ground == :foreground ? 30 : 40)

      [code]
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.