Introducing the rpi_rgb gem
require 'rpi_rgb'
rgb = RPiRGB.new([27, 17, 22])
rgb.color = 'red'
rgb.color = 'white'
rgb.color = '#FFFFFF' #=> white
rgb.color = '#FF0000' #=> red
rgb.color = '#FFFF00' #=> yellow
Resources
rgb rpi led colour color