Module: Paintbrush::Colors
- Defined in:
- lib/paintbrush/colors.rb
Overview
Provides methods that are temporarily injected into block context. Each method returns an escaped string including the current stack size with start and end escape codes, allowing the string to be reconstituted afterwards with nested strings restoring the previous color once they have terminated.
Constant Summary collapse
- COLOR_CODES =
{ black: '30', red: '31', green: '32', yellow: '33', blue: '34', purple: '35', cyan: '36', white: '37', default: '39' }.freeze