Most named colors have been moved from Sai to the new Sai-Mei gem. Only the 16 standard ANSI colors remain in Sai:
black
/bright_black
red
/bright_red
green
/bright_green
yellow
/bright_yellow
blue
/bright_blue
magenta
/bright_magenta
cyan
/bright_cyan
white
/bright_white
To restore access to previously available named colors, install the Sai-Mei gem:
# In your Gemfile
gem 'sai'
gem 'sai-mei'
Then choose which color palettes you want to use:
# Restore CSS color names (most similar to Sai v0.3.2)
Sai::Mei.css.install
# Use Tailwind colors
Sai::Mei.tailwind.install
# Use xterm 256-color palette
Sai::Mei.xterm.install
# Before (Sai v0.3.2)
Sai.azure.on_cornflower_blue.decorate("Hello!")
# After (Sai v0.4.0)
require 'sai/mei'
Sai::Mei.css.install
Sai.azure.on_cornflower_blue.decorate("Hello!") # Same code works after installing colors
Sai-Mei provides more flexibility in managing color palettes:
# Install specific colors
Sai::Mei.css
.only(:azure, :cornflower_blue)
.install
# Exclude specific colors
Sai::Mei.css
.excluding(:fuchsia, :salmon)
.install
# Rename colors during installation
Sai::Mei.css
.rename(azure: :sky, cornflower_blue: :ocean)
.install
See the Sai-Mei documentation for complete details on available palettes and features.