Method: CommandKit::Colors::ANSI.magenta

Defined in:
lib/command_kit/colors.rb

.magenta(string = nil) ⇒ String, MAGENTA

Sets the text color to magenta.

Parameters:

  • string (String, nil) (defaults to: nil)

    An optional string.

Returns:

  • (String, MAGENTA)

    The colorized string or just MAGENTA if no arguments were given.

See Also:



233
234
235
236
237
# File 'lib/command_kit/colors.rb', line 233

def magenta(string=nil)
  if string then "#{MAGENTA}#{string}#{RESET_COLOR}"
  else           MAGENTA
  end
end